A full-stack employee time tracking platform built with React Native, Node.js, RabbitMQ, PostgreSQL, and Docker.
ShiftStack was developed as a portfolio project to demonstrate modern full-stack software engineering practices, including secure authentication, mobile development, asynchronous message processing, API design, database architecture, and scalable backend systems.
ShiftStack allows employees to securely clock in and clock out using a mobile application while managers and administrators monitor time records through a centralized system.
The platform demonstrates:
- React Native mobile application development
- REST API development using Express.js
- JWT authentication and authorization
- RabbitMQ message queue architecture
- PostgreSQL database design
- Dockerized development environments
- Secure token storage using Expo SecureStore
- Role-based access control
- Asynchronous backend processing
- Full-stack employee time tracking application
- React Native mobile application
- JWT authentication and protected API routes
- RabbitMQ message-driven architecture
- PostgreSQL relational database
- Dockerized infrastructure
- Secure mobile token storage
- Role-based authorization system
- Real-time clock-in and clock-out workflow
- React Native
- Expo
- React Navigation
- Axios
- Context API
- Node.js
- Express.js
- REST APIs
- Authentication Systems
- Middleware Design
- PostgreSQL
- Relational Database Design
- SQL Queries
- Data Validation
- RabbitMQ
- Message Queues
- Worker Services
- Asynchronous Processing
- Decoupled System Design
- Docker
- Docker Compose
- Git
- GitHub
- Postman
Mobile App / Web Dashboard
|
| HTTPS Requests
v
Backend API Server
|
| Publishes Messages
v
RabbitMQ Message Broker
|
| Consumes Jobs
v
Worker Services
|
| SQL Queries
v
PostgreSQL Database
One of the primary goals of ShiftStack is to demonstrate scalable backend architecture.
Rather than allowing API requests to directly update the database, requests are published to RabbitMQ queues and processed asynchronously by worker services.
Benefits include:
- Separation of concerns
- Improved scalability
- Reduced API workload
- Better fault tolerance
- Easier future expansion
- Support for background processing
Current workflow:
Employee Request
|
v
API Server
|
v
RabbitMQ Queue
|
v
Worker Service
|
v
PostgreSQL Database
- Secure authentication
- Clock in / clock out
- View current shift status
- View personal time history
- Mobile application access
- Secure JWT session management
- View employee records
- Filter employee time entries
- Review weekly reports
- Approve timesheets
- Employee management
- Role-based access control
- Audit log monitoring
- System administration
(Add screenshot)
(Add screenshot)
(Add screenshot)
(Add screenshot)
(Add screenshot)
- React Native
- Expo
- React
- Next.js
- Node.js
- Express.js
- RabbitMQ
- PostgreSQL
- Docker
- Docker Compose
- Git
- GitHub
- Postman
- pgAdmin
- Login screen created
- Dashboard screen created
- Clock screen created
- Time history screen created
- Navigation stack configured
- Auth context connected
- Secure token storage added
- API helper configured
- Backend integration completed
- Login Screen
- Dashboard Screen
- Clock In / Clock Out Screen
- Time History Screen
- React Native
- Expo
- React Navigation
- Axios
- Expo SecureStore
- Mobile API networking issues resolved
- Authentication flow testing completed
- Axios service configuration improved
- Environment-based API configuration added
- Backend connectivity debugging completed
- Login error handling improved
- Session persistence verified
- Cross-device mobile testing completed
- Reports page created
- Weekly reports table added
- Date range filters added
- CSV export button added
- Employee Login
- Manager Dashboard
- Employee Management
- Project planning
- Architecture design
- Database planning
- Express server configured
- PostgreSQL database connection established
- Dockerized PostgreSQL instance running
- RabbitMQ service configured
- pgAdmin service configured
- API route system created
- Health endpoint operational
- Employee API endpoint operational
- SQL schema initialized
- User registration system
- Login system
- Password hashing
- JWT token generation
- Authentication middleware
- Protected routes
- Role-based authorization
- Current user endpoint
- Clock-in endpoint implemented
- Clock-out endpoint implemented
- Time tracking controller created
- Time routes created
- Shift status endpoint implemented
- Employee time history endpoint implemented
- Double clock-in prevention implemented
- Automatic worked time calculations added
- JWT protection added to time tracking routes
- RabbitMQ connection service implemented
- Queue publishing service created
- Clock worker service implemented
- Clock-in queue integrated
- Clock-out queue integrated
- API server publishing messages to RabbitMQ
- Worker consuming queue messages
- PostgreSQL updates performed by worker
- Queue monitoring configured
- Message-driven architecture established
- React Native mobile application initialized
- Navigation system implemented
- Authentication context implemented
- Secure token storage implemented
- Login screen connected to backend
- Dashboard screen created
- Clock tracking screen created
- Time history screen created
- Mobile application connected to API
- Mobile API networking issues resolved
- Backend connection troubleshooting completed
- Axios API service improved
- Environment-based API configuration added
- Android emulator networking configured
- Backend timeout handling improved
- Authentication request debugging added
- Login error handling improved
- Backend health testing endpoints added
- API request logging implemented
- Cross-device mobile testing completed
- Mobile authentication flow stabilized
- Security middleware installed
- Helmet configured
- Login rate limiting configured
- Request validation middleware implemented
- Auth route validation added
- Audit log service implemented
- Auth events added to audit logs
- Clock events added to audit logs
- Admin audit log endpoint implemented
- Report controller implemented
- Report routes implemented
- Weekly report endpoint created
- Weekly totals calculated from time entries
- Employee and date filtering added
- CSV export implemented
- Manager/admin report access protected
GET /api/health
POST /api/auth/register
POST /api/auth/login
GET /api/auth/me
GET /api/admin/employees
POST /api/time/clock-in
POST /api/time/clock-out
GET /api/time/status
GET /api/time/my-entries
GET /api/admin/audit-logs
GET /api/reports/weekly
GET /api/reports/weekly/exportgit clone https://github.com/YOUR_USERNAME/shiftstack.git
cd shiftstackcd mobile-app
npm installcd ../web-dashboard
npm installcd ../backend
npm installFrom project root:
docker compose up -dServices included:
- PostgreSQL
- RabbitMQ
- pgAdmin
cd backend
npm run devRuns on:
http://localhost:5000
cd backend
npm run worker:clockcd web-dashboard
npm run devRuns on:
http://localhost:3000
cd mobile-app
npm startScan QR code with Expo Go.
Create .env inside backend folder:
PORT=5000
DB_HOST=localhost
DB_PORT=5432
DB_USER=admin
DB_PASSWORD=password
DB_NAME=shiftstack
RABBITMQ_URL=amqp://localhost
JWT_SECRET=supersecretkeyGET /api/healthPOST /api/auth/register
POST /api/auth/login
GET /api/auth/mePOST /api/time/clock-in
POST /api/time/clock-out
GET /api/time/status
GET /api/time/my-entriesGET /api/admin/employees
GET /api/admin/audit-logs
GET /api/reports/weekly
GET /api/reports/weekly/export- Environment variable configuration
- Backend/server separation
- PostgreSQL database isolation
- Structured API architecture
- Password hashing with bcrypt
- JWT authentication
- Protected routes
- Role-based access control
- Token validation
- Message queue isolation
- Worker-based database processing
- Decoupled API/database architecture
- Helmet HTTP security headers
- Login rate limiting
- Express Validator request validation
- Audit logging service
- Failed login tracking
- Admin-only audit log access
- Session expiration table integration
- Refresh tokens
- Secure API validation
- Multi-factor authentication
- Account lockout protection
- CSV exports
- GPS clock-in verification
- QR code clock-in
- Push notifications
- Payroll integration
- Analytics dashboards
- Multi-company support
Matthew J. Nicol
GitHub: https://github.com/Mjn92
LinkedIn: https://www.linkedin.com/in/matthew-nicol-56b089b0/