A comprehensive full-stack application for managing community tasks, events, attendance, and contributions with role-based access control.
- User Management: Registration, authentication, and profile management
- Community Management: Create and manage communities with member invitations
- Task Management: Create, assign, and track tasks with status workflow
- Contribution System: Point-based rewards for task completion and participation
- Attendance Tracking: Daily attendance marking and leave management
- Event Calendar: Community events and scheduling
- Notifications: Email and in-app notification system
- Dashboard & Analytics: Role-specific dashboards with reporting
- Platform Admin: System-wide management and oversight
- Community Admin: Community-specific management and member oversight
- Member: Task participation and contribution tracking
- Node.js with Express.js
- MySQL database with Sequelize ORM
- JWT authentication
- Nodemailer for email notifications
- Bcryptjs for password hashing
- React.js with Vite
- Tailwind CSS for styling
- React Router for navigation
- Axios for API calls
- React Hook Form for form handling
- Heroicons for icons
Loomio/
├── backend/ # Express.js API server
│ ├── src/
│ │ ├── config/ # Database and app configuration
│ │ ├── controllers/ # Route controllers
│ │ ├── middleware/ # Authentication and validation
│ │ ├── models/ # Sequelize models
│ │ ├── routes/ # API routes
│ │ └── server.js # Main server file
│ ├── package.json
│ └── env.example
├── frontend/ # React.js application
│ ├── src/
│ │ ├── components/ # Reusable components
│ │ ├── context/ # React context providers
│ │ ├── pages/ # Page components
│ │ ├── services/ # API service functions
│ │ ├── hooks/ # Custom React hooks
│ │ └── utils/ # Utility functions
│ ├── package.json
│ └── tailwind.config.js
└── README.md
- Node.js (v16 or higher)
- MySQL (v8.0 or higher)
- npm or yarn
-
Clone the repository
git clone https://github.com/jvkousthub/Loomio.git cd Loomio -
Environment Configuration
copy .env.example .env
Update the single
.envfile in the root directory with your credentials:DB_HOST=localhost DB_PORT=3306 DB_NAME=loomio_db DB_USER=root DB_PASSWORD=your_password JWT_SECRET=your_super_secret_jwt_key_here PORT=5000 VITE_API_URL=http://localhost:5000/api
-
Install all dependencies
npm install cd backend && npm install cd ../frontend && npm install cd ..
-
Database Setup (see Database Setup section below)
-
Start the application
Option 1 - Complete Startup (Recommended for first time):
start.bat
This script will:
- ✅ Check if MySQL is running
- ✅ Verify database connection
- ✅ Check environment configuration
- ✅ Install dependencies if needed
- ✅ Start backend server
- ✅ Start frontend server
- ✅ Open application in browser
Option 2 - Quick Start (when already configured):
start-quick.bat
Starts both servers without checks (faster for development)
Option 3 - Manual start:
# Terminal 1 - Backend cd backend npm start # Terminal 2 - Frontend cd frontend npm run dev
To stop the application:
stop.bat
Or close the Backend and Frontend terminal windows
- Backend API:
http://localhost:5000 - Frontend:
http://localhost:5173(or the port shown in terminal)
-
Navigate to backend directory
cd backend -
Install dependencies
npm install
-
Environment Configuration
cp env.example .env
Update the
.envfile with your database credentials:DB_HOST=localhost DB_PORT=3306 DB_NAME=loomio_db DB_USER=your_username DB_PASSWORD=your_password JWT_SECRET=your_super_secret_jwt_key PORT=5000
-
Start the server
npm run dev
The API will be available at
http://localhost:5000
-
Navigate to frontend directory
cd frontend -
Install dependencies
npm install
-
Environment Configuration
cp env.example .env
Update the
.envfile:VITE_API_URL=http://localhost:5000/api
-
Start the development server
npm run dev
The application will be available at
http://localhost:3000
- Users: User accounts with roles and community associations
- Communities: Community information and settings
- Tasks: Task details with assignments and status tracking
- TaskAssignments: Many-to-many relationship between tasks and users
- Contributions: Point-based contribution tracking
- Attendance: Daily attendance records
- LeaveRequests: Leave request management
- Events: Community events and calendar entries
- Notifications: In-app and email notifications
- JWT-based authentication with role-based access control
- Protected routes with middleware validation
- Role-based permissions for different user types
- Secure password hashing with bcryptjs
- Responsive design with Tailwind CSS
- Modern interface with clean, intuitive navigation
- Role-specific dashboards with relevant information
- Real-time updates for task status and notifications
- Accessible components following best practices
- Task Completion: 10 points
- Event Attendance: 5 points
- Discussion Participation: 2 points
- Personal dashboards with contribution tracking
- Community leaderboards with ranking system
- Monthly reports and analytics
- Achievement tracking and milestones
- Connect your GitHub repository
- Set environment variables
- Deploy the Express.js application
- Connect your GitHub repository
- Set build command:
npm run build - Set output directory:
dist - Deploy the React application
- Use a cloud MySQL provider (PlanetScale, Railway DB, or similar)
- Update environment variables with production database credentials
POST /api/auth/register- User registrationPOST /api/auth/login- User loginGET /api/auth/me- Get current userPOST /api/auth/logout- User logout
GET /api/users- Get all users (admin)GET /api/users/:id- Get user by IDPUT /api/users/:id- Update userDELETE /api/users/:id- Delete user
GET /api/communities- Get all communitiesPOST /api/communities- Create communityGET /api/communities/:id- Get community by IDPUT /api/communities/:id- Update communityDELETE /api/communities/:id- Delete communityPOST /api/communities/:id/invite- Invite user to community
GET /api/tasks- Get all tasksPOST /api/tasks- Create taskGET /api/tasks/:id- Get task by IDPUT /api/tasks/:id- Update taskPOST /api/tasks/:id/assign- Assign task to usersPUT /api/tasks/:id/status- Update task status
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the ISC License.
For support and questions, please open an issue in the GitHub repository.
- Real-time notifications with WebSocket integration
- File upload system for task submissions
- Advanced analytics with charts and graphs
- Mobile application with React Native
- Integration APIs with external services
- Advanced reporting with PDF export
- Multi-language support for international communities