Skip to content

acmnuceskhi/worklog-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

61 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Worklog App

⚠️ Project Completed – Active development has ended. The live deployment is functional but starts with an empty database. Credentials have been rotated. See STATUS.md for details.

A hierarchical worklog tracking system for organizations, teams, and members with credits management, 5-state progress tracking, and rating system.

Features

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.pk domains
  • Team Management: Invite members via email, set deadlines, review worklogs
  • Role-Based Access Control: Strict permissions based on organizational hierarchy

Tech Stack

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

Getting Started

  1. Install dependencies:

    npm install
  2. 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 (AdapterError on account.findUnique). Accelerate does not fully support all Prisma Client methods required by NextAuth.js.

    Therefore, use a direct connection string (starting with postgres:// or postgresql://) for DATABASE_URL. Example:

    DATABASE_URL="postgresql://user:password@host:5432/database?schema=public"
    

    DIRECT_URL is defined in .env.example for 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).

  3. Run database migrations & seed:

    npx prisma migrate dev
    npm run db:seed
  4. Start development server:

    npm run dev

Open http://localhost:3000 to view the application.

Documentation

Comprehensive documentation is available to help you understand the codebase, set up the development environment, and integrate with the API.

Available Scripts

  • npm run dev - Start development server
  • npm run build - Build for production
  • npm run start - Start production server
  • npm run lint - Run ESLint
  • npm run prettier - Format code with Prettier
  • npm run db:seed - Seed database with initial data
  • npx prisma studio - Open Prisma Studio (database GUI)
  • npx prisma migrate dev - Run database migrations

About

Team-based worklog application built with Next.js, Prisma, and PostgreSQL. Features user authentication, worklog submissions, team management, and contribution ratings.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors