A complete, production-ready web application for a private company called "TypeAworld". Built with React, Vite, Tailwind CSS, and Firebase backend (Firestore, Authentication, Storage).
- Secure Authentication: Email/password login with 11 pre-approved email addresses only
- Role-Based Access Control: Admin, Secretary, and Member roles with different permissions
- Dashboard: Welcome message with role display and weekly meeting reminder
- Company Profile: Company history, objectives, and acts & articles with download functionality
- Members Management: View all members with charts, add/edit/delete members (Admin only)
- Meeting Minutes: Post and view meeting minutes with PDF download (Secretary/Admin)
- Projects & Ideas: Track projects with status (Success/Failed/In Progress) and download reports
- Attendance System: Mark attendance, submit apologies, view history
- Admin Portal: Manage members, allowed emails, and delete content
- Download Functionality: All posts can be downloaded as PDF files
- Mobile Responsive: Fully responsive design using Tailwind CSS
- Secure Firestore: Role-based security rules for data protection
- Node.js (v16 or higher)
- npm or yarn
- A Google account for Firebase
- Go to Firebase Console
- Click "Add project"
- Enter project name (e.g., "typeaworld")
- Follow the setup wizard (you can disable Google Analytics for this project)
- Click "Create project"
- In Firebase Console, go to Build → Authentication
- Click Get Started
- Select Email/Password sign-in provider
- Enable it and click Save
- In Firebase Console, go to Build → Firestore Database
- Click Create database
- Select a location (choose closest to your users)
- Start in Test mode (we'll update security rules later)
- Click Enable
- In Firebase Console, go to Build → Storage
- Click Get Started
- Follow the setup wizard
- Start in Test mode
- In Firebase Console, go to Project Settings (gear icon)
- Scroll down to "Your apps" section
- Click the web icon (
</>) - Register your app (name it "TypeAworld")
- Copy the firebaseConfig object
npm installOpen src/firebase/config.js and replace the placeholder values with your actual Firebase configuration:
const firebaseConfig = {
apiKey: "YOUR_ACTUAL_API_KEY",
authDomain: "YOUR_PROJECT_ID.firebaseapp.com",
projectId: "YOUR_PROJECT_ID",
storageBucket: "YOUR_PROJECT_ID.appspot.com",
messagingSenderId: "YOUR_MESSAGING_SENDER_ID",
appId: "YOUR_APP_ID"
};In src/firebase/config.js, update the ALLOWED_EMAILS array with your 11 specific email addresses:
export const ALLOWED_EMAILS = [
'admin@typeaworld.com',
'secretary@typeaworld.com',
'member1@typeaworld.com',
'member2@typeaworld.com',
'member3@typeaworld.com',
'member4@typeaworld.com',
'member5@typeaworld.com',
'member6@typeaworld.com',
'member7@typeaworld.com',
'member8@typeaworld.com',
'member9@typeaworld.com'
// Replace with your actual 11 emails
];- Go to Firebase Console → Authentication → Users tab
- Click Add user
- Enter each of the 11 email addresses
- Set a password for each user
- Click Add user
- Repeat for all 11 users
After creating users, you need to set their roles in Firestore. You can do this via Firebase Console:
- Go to Firestore Database
- Create a collection named
users - For each user, create a document with their Firebase UID as the document ID:
- Document ID: The user's Firebase UID (from Authentication tab)
- Fields:
email: (string) User's emailrole: (string) "Admin", "Secretary", or "Member"lastLogin: (timestamp) Current timestamp
Example for Admin user:
- Document ID:
abc123xyz...(Firebase UID) - email: "admin@typeaworld.com"
- role: "Admin"
- lastLogin: [current timestamp]
Important: You must have at least one Admin user to access the Admin Portal.
- Go to Firebase Console → Firestore Database → Rules tab
- Delete the existing rules
- Copy the contents of
firestore.rulesfile from this project - Paste into the rules editor
- Click Publish
- Install Firebase CLI:
npm install -g firebase-tools- Login to Firebase:
firebase login- Initialize Firebase in your project:
firebase init- Select "Firestore"
- Select "Use an existing project"
- Choose your TypeAworld project
- Select "firestore.rules" file (already exists)
- Skip indexes for now
- Deploy rules:
firebase deploy --only firestore:rulesnpm run devThe application will be available at http://localhost:3000
npm run buildThe built files will be in the dist directory.
npm run preview- Initialize Firebase Hosting:
firebase init hosting- Select "Use an existing project"
- Choose your TypeAworld project
- Public directory:
dist - Configure as single-page app: Yes
- Set up automatic builds: No
- Build the project:
npm run build- Deploy:
firebase deploy- Install Vercel CLI:
npm install -g vercel- Deploy:
vercelFollow the prompts to deploy your project.
- Build the project:
npm run build- Deploy the
distfolder to Netlify via their dashboard or CLI.
TypeAworld/
├── public/
├── src/
│ ├── components/
│ │ ├── Navbar.jsx # Navigation bar with role-based links
│ │ └── ProtectedRoute.jsx # Route protection component
│ ├── context/
│ │ └── AuthContext.jsx # Authentication context provider
│ ├── firebase/
│ │ ├── auth.js # Authentication functions
│ │ ├── config.js # Firebase configuration & email allowlist
│ │ └── firestore.js # Firestore CRUD operations
│ ├── pages/
│ │ ├── AdminPortal.jsx # Admin-only management interface
│ │ ├── Attendance.jsx # Attendance & apologies tracking
│ │ ├── CompanyProfile.jsx # Company history, objects, acts
│ │ ├── Dashboard.jsx # Main dashboard
│ │ ├── Login.jsx # Login page
│ │ ├── Members.jsx # Members list with charts
│ │ ├── Minutes.jsx # Meeting minutes
│ │ └── Projects.jsx # Projects & ideas
│ ├── App.jsx # Main app with routing
│ ├── index.css # Global styles with Tailwind
│ └── main.jsx # Entry point
├── firestore.rules # Firestore security rules
├── index.html # HTML template
├── package.json # Dependencies
├── tailwind.config.js # Tailwind configuration
├── vite.config.js # Vite configuration
└── README.md # This file
- Access all features
- Add/edit/delete members
- Manage allowed email list
- Delete any content (minutes, projects, apologies)
- View all attendance records
- Access Admin Portal
- Post and edit meeting minutes
- Delete minutes
- View all attendance records
- Add projects
- Cannot access Admin Portal
- View all content
- Add projects
- Mark own attendance
- Submit apologies
- Cannot delete content (except own projects)
- Cannot access Admin Portal
- Email/password authentication
- Only pre-approved emails can log in
- Redirects to dashboard on successful login
- Welcome message with user's role
- Persistent weekly meeting reminder (Friday at 4 PM)
- Quick links to all major sections
- Statistics overview
- Company history (exact text as specified)
- 6 company objectives
- Company acts & articles with download
- All content downloadable as PDF
- List of all 11 members with details
- Bar chart and pie chart showing members by position
- Tags for each member (#Founder, #Secretary, etc.)
- Admin can add/edit/delete members
- Download full members list as PDF
- Secretary/Admin can post minutes
- All members can view minutes
- Each minute has a download button (PDF)
- Timestamp and author information
- All members can post project ideas
- Track project status (Success/Failed/In Progress)
- Color-coded status indicators
- Add project reports with lessons learned
- Download full project details as PDF
- Members can mark daily attendance (Present/Absent)
- If absent, submit apology with reason
- Admin/Secretary can view full history
- Download attendance report as PDF
- Manage members (add/edit/delete)
- Manage allowed email list
- Bulk delete content (minutes, projects, apologies)
- View all system data
- Email allowlist in code (
ALLOWED_EMAILSarray) - Firestore security rules with role-based access
- Protected routes requiring authentication
- Role-based UI elements
- Secure password storage via Firebase Auth
- Ensure the email is in the
ALLOWED_EMAILSarray insrc/firebase/config.js - After updating the array, restart the development server
- Check that Firestore security rules are deployed
- Verify user roles are set correctly in Firestore
userscollection - Ensure the user is authenticated
- Ensure
rechartspackage is installed - Check browser console for errors
- Verify members data exists in Firestore
- Ensure
jspdfpackage is installed - Check browser popup blocker settings
- Verify content exists before downloading
- Verify user role is set to "Admin" in Firestore
- Check the
userscollection in Firestore Database - Ensure the user's Firebase UID matches the document ID
After deployment, you'll need to:
-
Add the first Admin user via Firebase Console:
- Go to Authentication → Add user
- Create admin account
- Go to Firestore → users collection
- Add document with user's UID, email, and role: "Admin"
-
Add members via the Admin Portal:
- Log in as Admin
- Go to Admin Portal → Manage Members
- Add all 11 members with their details
-
Add company acts via Firebase Console (optional):
- Go to Firestore → acts collection
- Add documents with title and content fields
For issues or questions:
- Check the Troubleshooting section
- Review Firebase Console for errors
- Check browser console for client-side errors
- Verify all configuration steps are complete
This is a private company portal. All rights reserved.
- React 18 - UI library
- Vite - Build tool
- Tailwind CSS - Styling
- Firebase - Backend (Auth, Firestore, Storage)
- React Router - Navigation
- Recharts - Charts visualization
- jsPDF - PDF generation
- Lucide React - Icons
- date-fns - Date formatting