ProTrack is a modern, full-stack work statistics system built with Next.js 15, designed to help teams manage projects, track tasks, and analyze contributions efficiently.
- Simple user management with role-based access control
- Support for different roles: Admin, Manager, Developer, Team Lead
- Streamlined user interface for account management
- Create and manage projects with difficulty multipliers
- Track project status and progress
- Project overview with key metrics
- Create and assign tasks with priority levels (high, medium, low)
- Track task status (not_started, developing, testing, online, suspended, canceled)
- Categorize tasks (op, h5, web, architecture)
- Set start and end dates for better timeline management
- Link tasks to external issue tracking systems
- Track contribution scores
- Comprehensive contribution tracking across projects
- Visual statistics and performance metrics
- Project-based and cross-project contribution views
- Advanced filtering by project and date range
- Interactive charts and data visualization
- Export functionality for detailed reports
- Real-time project and task statistics
- Performance metrics visualization
- Customizable dashboard views
- Next.js 15 - React framework for server-side rendering and API routes
- shadcn/ui - Beautiful, accessible UI components
- Tailwind CSS - Utility-first CSS framework
- Zustand - Lightweight state management
- Recharts - Interactive data visualization
- React Query - Server state management
- React Hook Form - Form handling with validation
- Next.js API Routes - Server-side API endpoints
- PostgreSQL - Robust relational database
- Drizzle ORM - Type-safe database operations
- Zod - Schema validation
- Node.js 18.17 or later
- PostgreSQL 16 or later
- pnpm package manager
- Clone the repository:
git clone https://github.com/yourusername/protrack.git
cd protrack- Install dependencies:
pnpm install- Set up environment variables:
Create a
.envfile in the root directory with the following variables:
DATABASE_URL="postgresql://username:password@localhost:5432/protrack"- Initialize the database:
pnpm db:push- Start the development server:
pnpm devThe application will be available at http://localhost:3000
ProTrack can also be deployed using Docker and Docker Compose for a containerized environment.
- Docker installed on your system
- Docker Compose installed on your system
- Clone the repository:
git clone https://github.com/yourusername/protrack.git
cd protrack- Create a
.envfile in the root directory:
DATABASE_URL="postgresql://postgres:postgres@db:5432/protrack"
NEXT_PUBLIC_API_URL="http://localhost:3000/api"- Start the application:
docker-compose up --buildThe application will be available at http://localhost:3000
After pulling updates from git, you need to rebuild the Docker image to incorporate the changes:
# Pull the latest changes
git pull origin main
# Rebuild and restart the containers
docker-compose up --build
# Or if you prefer to rebuild in detached mode
docker-compose up --build -dImportant: Do NOT use docker-compose restart after pulling updates, as it will not rebuild the image with your new code changes.
# Force rebuild without cache (if experiencing issues)
docker-compose build --no-cache
docker-compose up
# Stop, rebuild, and start
docker-compose down
docker-compose up --buildFor more detailed Docker setup instructions, see DOCKER.md.
For comprehensive information on PostgreSQL database backup and import procedures, see POSTGRES_BACKUP.md.
This includes:
- Docker and native PostgreSQL backup methods
- Automated backup scripts
- Data restoration procedures
- Best practices and troubleshooting
The system uses a PostgreSQL database with the following main tables:
- Basic user information and role management
- Roles: admin, manager, developer, team_lead
- Project details and status tracking
- Difficulty multiplier for contribution calculations
- Task management with priority and status
- Assignment tracking
- Start and end date management
- Issue link integration
- Contribution score tracking
- Task categories (op, h5, web, architecture)
- Drizzle Studio: Run
pnpm db:studioto view and manage database - Drizzle Kit: Database migration and schema management
- ESLint: Code linting
- TypeScript: Type safety
- Tailwind CSS: Styling
GET /api/dashboard/stats- Get consolidated dashboard statistics
GET /api/users- List all usersGET /api/users/stats- Get user statistics (team member count)POST /api/users- Create new userGET /api/users/:id- Get user detailsPUT /api/users/:id- Update userDELETE /api/users/:id- Delete user
GET /api/projects- List all projectsGET /api/projects/stats- Get project statistics (total project count)POST /api/projects- Create new projectGET /api/projects/:id- Get project detailsPUT /api/projects/:id- Update projectDELETE /api/projects/:id- Delete project
GET /api/tasks- List all tasks (with pagination)GET /api/tasks/stats- Get task statistics (active, completed, total counts)POST /api/tasks- Create new taskGET /api/tasks/:id- Get task detailsPUT /api/tasks/:id- Update taskDELETE /api/tasks/:id- Delete task
GET /api/contributions- Get contribution statisticsGET /api/contributions/project/:id- Get project-specific contributionsGET /api/contributions/user/:id- Get user-specific contributionsGET /api/contributions/export- Export contribution data
The application uses Zustand for state management with the following stores:
useUserStore- User authentication and profileuseProjectStore- Project managementuseTaskStore- Task managementuseContributionStore- Contribution tracking and analysisuseDashboardStore- Dashboard data and filters
The application uses shadcn/ui components for a consistent and accessible interface:
- Navigation and Layout
- Forms and Inputs
- Data Tables
- Charts and Statistics
- Modals and Dialogs
- Loading States
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Next.js team for the amazing framework
- shadcn/ui for the beautiful components
- PostgreSQL community for the robust database
- All contributors and users of the project