⚠️ Project Completed – Active development has ended. The live deployment is functional but starts with an empty database. Credentials have been rotated. SeeSTATUS.mdfor details.
A hierarchical worklog tracking system for organizations, teams, and members with credits management, 5-state progress tracking, and rating system.
The application provides a comprehensive set of tools for managing worklogs across organizational hierarchies.
- Three-Tier Hierarchy: Organization Owner → Team Owner → Team Member
- Credits Management: Add/subtract/set credits for organizations and teams
- 5-State Progress Tracking: STARTED → HALF_DONE → COMPLETED → REVIEWED → GRADED
- Rating System: Organization owners rate worklogs 1-10 (hidden from team members/owners)
- File Attachments: Support for images and documents as worklog evidence
- OAuth Authentication: Google OAuth with Auth.js v5, restricted to
@nu.edu.pk/@isb.nu.edu.pkdomains - Team Management: Invite members via email, set deadlines, review worklogs
- Role-Based Access Control: Strict permissions based on organizational hierarchy
The application is built using modern web technologies with a focus on type safety, developer experience, and production-grade performance.
- Framework: Next.js 16 with App Router
- Database: Prisma 7 + PostgreSQL
- Styling: Tailwind CSS 4
- Authentication: Auth.js v5 (Google OAuth, restricted to university domains)
- Validation: Zod for API request validation
- Email: Resend SDK with React Email templates
-
Install dependencies:
npm install
-
Set up environment variables:
cp .env.example .env # Configure DATABASE_URL, AUTH_SECRET (Google OAuth), and AUTH_TRUST_HOST=true (for local prod testing)Database Connection: The application uses only
DATABASE_URL(direct PostgreSQL connection). Prisma Accelerate (prisma+postgres://...) was initially tried but caused runtime OAuth errors (AdapterErroronaccount.findUnique). Accelerate does not fully support all Prisma Client methods required by NextAuth.js.Therefore, use a direct connection string (starting with
postgres://orpostgresql://) forDATABASE_URL. Example:DATABASE_URL="postgresql://user:password@host:5432/database?schema=public"DIRECT_URLis defined in.env.examplefor documentation purposes but is not referenced in the code. This is because Prisma 7 with a direct PostgreSQL connection works with a single URL (DATABASE_URL). -
Run database migrations & seed:
npx prisma migrate dev npm run db:seed
-
Start development server:
npm run dev
Open http://localhost:3000 to view the application.
Comprehensive documentation is available to help you understand the codebase, set up the development environment, and integrate with the API.
- api-documentation.md - Complete API reference
- ONBOARDING.md - Repository navigation and file organization
- .github/copilot-instructions.md - AI coding guidelines
- STATUS.md - Project completion and deployment status
npm run dev- Start development servernpm run build- Build for productionnpm run start- Start production servernpm run lint- Run ESLintnpm run prettier- Format code with Prettiernpm run db:seed- Seed database with initial datanpx prisma studio- Open Prisma Studio (database GUI)npx prisma migrate dev- Run database migrations