A full-stack Progressive Web Application (PWA) that is a functional clone of ConnectTeam.com. This application provides workforce management features including shift scheduling, time tracking with location verification, task management, team communication, and a knowledge base.
- Mobile-First Design: Enforces mobile viewport and mobile-first user experience
- Multi-Role Authentication: Admin, Manager, and Employee roles with JWT-based authentication
- Shift Scheduling: Create, assign, and manage work shifts
- Time Clock: Clock in/out with location verification using Apple MapKit JS
- Task Management: Create, assign, and track tasks with priorities and statuses
- Real-Time Chat: In-app messaging between team members using Socket.io
- Knowledge Base: Searchable knowledge base with categories and tags
- Admin Dashboard: Comprehensive tools for managing users, teams, and company settings
- PWA Features: Service worker for offline functionality and web app manifest for installability
- React 18
- Redux Toolkit for state management
- Tailwind CSS for styling
- React Router for navigation
- Socket.io Client for real-time communication
- Apple MapKit JS for mapping functionality
- PWA with service worker and manifest
- Node.js with Express.js
- PostgreSQL database
- Prisma ORM for database operations
- JWT for authentication
- Socket.io for real-time features
- Bcrypt for password hashing
- Node.js (v16 or higher)
- PostgreSQL
- npm or yarn
- Clone the repository:
git clone <repository-url>
cd ClockInApps- Install dependencies for both frontend and backend:
npm run install-all- Set up the database:
cd server
cp .env.example .env- Configure your database connection in
server/.env:
DATABASE_URL="postgresql://username:password@localhost:5432/connectteam_db"
JWT_SECRET="your-super-secret-jwt-key"
JWT_EXPIRE="7d"
PORT=5000
NODE_ENV=development
CLIENT_URL=http://localhost:3000
- Run database migrations and seed the database:
npm run db:generate
npm run db:push
npm run db:seed- Start both the frontend and backend concurrently:
npm run devThis will start:
- Backend server on http://localhost:5000
- Frontend development server on http://localhost:3000
The following demo accounts are created when you seed the database:
- Admin: admin@connectteam.com / admin123
- Manager: manager@connectteam.com / manager123
- Employee: employee1@connectteam.com / employee123
ClockInApps/
├── client/ # React frontend
│ ├── public/ # Static files and PWA assets
│ ├── src/
│ │ ├── components/ # React components
│ │ ├── services/ # API services
│ │ ├── store/ # Redux store and slices
│ │ └── App.js # Main App component
│ ├── package.json
│ └── tailwind.config.js
├── server/ # Node.js backend
│ ├── prisma/ # Database schema and migrations
│ ├── routes/ # API routes
│ ├── middleware/ # Express middleware
│ ├── index.js # Main server file
│ └── package.json
└── package.json # Root package.json with scripts
POST /api/auth/login- User loginPOST /api/auth/register- User registrationGET /api/auth/me- Get current user
GET /api/users- Get all users (admin/manager only)GET /api/users/:id- Get user by IDPUT /api/users/:id- Update userDELETE /api/users/:id- Delete user (admin only)
GET /api/teams- Get all teamsPOST /api/teams- Create team (admin/manager only)GET /api/teams/:id- Get team by IDPUT /api/teams/:id- Update teamDELETE /api/teams/:id- Delete team (admin only)
GET /api/shifts- Get all shiftsPOST /api/shifts- Create shift (admin/manager only)GET /api/shifts/:id- Get shift by IDPUT /api/shifts/:id- Update shiftDELETE /api/shifts/:id- Delete shift
GET /api/time-entries- Get all time entriesPOST /api/time-entries/clock-in- Clock inPUT /api/time-entries/:id/clock-out- Clock outGET /api/time-entries/:id- Get time entry by IDPUT /api/time-entries/:id- Update time entryDELETE /api/time-entries/:id- Delete time entry (admin/manager only)
GET /api/tasks- Get all tasksPOST /api/tasks- Create taskGET /api/tasks/:id- Get task by IDPUT /api/tasks/:id- Update taskDELETE /api/tasks/:id- Delete task
GET /api/chats- Get all chatsPOST /api/chats- Create chatGET /api/chats/:id- Get chat by IDPOST /api/chats/:id/messages- Send messageDELETE /api/chats/:id- Delete chat
GET /api/notifications- Get all notificationsPUT /api/notifications/:id/read- Mark notification as readPUT /api/notifications/read-all- Mark all notifications as readDELETE /api/notifications/:id- Delete notification
GET /api/knowledge- Get all knowledge postsPOST /api/knowledge- Create knowledge postGET /api/knowledge/:id- Get knowledge post by IDPUT /api/knowledge/:id- Update knowledge postDELETE /api/knowledge/:id- Delete knowledge post
This application is a Progressive Web App (PWA) with the following features:
- Offline Support: Service worker caches essential assets for offline functionality
- Installable: Can be installed on devices from the browser
- Responsive Design: Optimized for mobile devices with a mobile-first approach
- Push Notifications: Supports push notifications for important updates
The application enforces a mobile viewport even when accessed on desktop browsers. The maximum width is set to 428px (iPhone Pro Max width) to ensure a consistent mobile experience across all devices.
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License.