A modern attendance management system built with Next.js (client) and Express.js + TypeScript (server) for University of Mindanao.
UMAttend is a comprehensive attendance management application designed to streamline event attendance tracking for University of Mindanao.
Frontend:
- Next.js 15 with Turbopack
- React 19
- TypeScript
- TailwindCSS
- Radix UI Components
Backend:
- Express.js
- TypeScript
- Prisma ORM
- PostgreSQL
- JWT Authentication
- Google OAuth
- Node.js (v18 or higher)
- npm or yarn
- PostgreSQL database
- Git
-
Clone the repository
git clone https://github.com/riomar0001/umattend-app.git cd umattend-app -
Install root dependencies
npm install
-
Setup Server
cd server npm install -
Setup Client
cd ../client npm install -
Environment Configuration
Server Environment (
server/.env):# Database DATABASE_URL="postgresql://username:password@localhost:5432/umattend" DIRECT_URL="postgresql://username:password@localhost:5432/umattend" # JWT JWT_SECRET="your-jwt-secret" JWT_REFRESH_SECRET="your-refresh-secret" # Google OAuth GOOGLE_CLIENT_ID="your-google-client-id" GOOGLE_CLIENT_SECRET="your-google-client-secret" # Server PORT=5000 NODE_ENV="development"
Client Environment (
client/.env.local):NEXT_PUBLIC_API_URL="http://localhost:5000" NEXT_PUBLIC_GOOGLE_CLIENT_ID="your-google-client-id"
-
Database Setup
cd server npx prisma migrate dev npx prisma generate
Start both servers at once:
npm run devThis will start both the frontend and backend servers concurrently with colored output.
Alternative methods:
# Using concurrently package
npm run dev:concurrent
# Windows batch file (opens separate windows)
start-dev.bat
# Unix/Linux/Mac shell script
./start-dev.shIf you prefer to run servers separately:
-
Start the Server (Terminal 1):
cd server npm run devServer will run on
http://localhost:5000 -
Start the Client (Terminal 2):
cd client npm run devClient will run on
http://localhost:3000
Build both projects:
npm run buildStart both servers in production:
npm run startManual approach:
-
Build and Start Server:
cd server npm run build npm run prod -
Build and Start Client:
cd client npm run build npm start
# Development
npm run dev # Start both servers (recommended)
npm run dev:concurrent # Alternative using concurrently
npm run dev:client # Start only frontend
npm run dev:server # Start only backend
# Production
npm run build # Build both projects
npm run start # Start both servers in production
npm run start:concurrent # Alternative using concurrently
npm run start:client # Start only frontend
npm run start:server # Start only backend
# Installation
npm run install:all # Install all dependenciesThis project uses Husky for pre-commit hooks with lint-staged to ensure code quality.
Server (cd server):
npm run lint # Check for linting errors
npm run lint:fix # Auto-fix linting errors
npm run format # Format code with Prettier
npm run format:check # Check code formatting
npm run type-check # TypeScript type checkingClient (cd client):
npm run lint # Next.js linting
npm run lint:fix # Auto-fix Next.js linting errors
npm run format # Format code with Prettier
npm run format:check # Check code formatting
npm run type-check # TypeScript type checking# Check all files formatting
npm run format:server && npm run format:client
# Run full validation
npm run lint:server && npm run lint:client && npm run type-check:server && npm run type-check:client- Next.js Documentation
- Express.js Guide
- Prisma Documentation
- TypeScript Handbook
- TailwindCSS Documentation
umattend-app/
βββ client/ # Next.js Frontend
β βββ src/
β β βββ app/ # App Router pages
β β βββ components/ # Reusable components
β β βββ lib/ # Utilities and configs
β βββ public/ # Static assets
β βββ package.json
βββ server/ # Express.js Backend
β βββ src/
β β βββ v1/ # API v1 routes
β β β βββ controllers/
β β β βββ services/
β β β βββ repositories/
β β β βββ middlewares/
β β β βββ validators/
β β βββ configs/ # Configuration files
β β βββ utils/ # Utility functions
β βββ prisma/ # Database schema & migrations
β βββ package.json
βββ .husky/ # Git hooks
βββ CONTRIBUTING.md # Contribution guidelines
βββ package.json # Root package.json
- Authentication:
/api/v1/auth/* - Users:
/api/v1/users/* - Events:
/api/v1/events/* - Students:
/api/v1/students/*
This project includes automated CI/CD pipelines using GitHub Actions with Docker, Nginx, and Let's Encrypt SSL.
For a complete setup guide, see QUICKSTART.md (30 minutes)
Deployment documentation:
- π Deployment Guide - Comprehensive deployment documentation
- β Deployment Checklist - Step-by-step checklist
- π Pipeline Summary - Architecture and overview
- Local:
docker-compose.local.yml- Development with hot reload - Staging: Auto-deploy on push to
stagingbranch - Production: Auto-deploy on push to
main/masterbranch
β
Automated Docker builds
β
Nginx reverse proxy
β
SSL/TLS with Let's Encrypt
β
Auto-renewal of SSL certificates
β
Database migrations
β
Zero-downtime deployments
β
Environment-specific configurations
# Local development with Docker
docker compose -f docker-compose.local.yml up -d
# Deploy using helper script
./scripts/deploy.sh staging up # Start staging
./scripts/deploy.sh staging logs # View logsSee .github/secrets.template for complete list of required secrets:
- SSH credentials
- Domain configuration
- Environment variables
- API keys
Please read CONTRIBUTING.md for details on:
- Branching strategy
- Commit message format
- Code style guidelines
- Pre-push checklist
- ESLint: Code linting and quality
- Prettier: Code formatting
- TypeScript: Type safety
- Prisma Studio: Database management UI
- Docker: Containerization and deployment
- GitHub Actions: CI/CD automation