CP Tracker is a competitive programming practice tracker that helps users organize and monitor their problem-solving journey. Users can create practice sheets, add problems from platforms like Codeforces and AtCoder, track their solving status, and view progress analytics on a dashboard.
Preferred communication style: Simple, everyday language.
- Framework: React 18 with TypeScript
- Routing: Wouter for lightweight client-side routing
- State Management: TanStack Query (React Query) for server state management
- Styling: Tailwind CSS with shadcn/ui component library
- Build Tool: Vite for development and production builds
- Forms: React Hook Form with Zod validation
- Framework: Express.js with TypeScript
- API Design: RESTful API with typed route definitions in
shared/routes.ts - Authentication: Passport.js with local strategy, session-based auth using express-session
- Password Security: scrypt hashing with timing-safe comparison
- Database: PostgreSQL
- ORM: Drizzle ORM with type-safe schema definitions
- Schema Location:
shared/schema.tscontains all table definitions - Migrations: Drizzle Kit for schema migrations (
db:pushcommand)
├── client/ # React frontend
│ └── src/
│ ├── components/ # UI components (shadcn/ui based)
│ ├── hooks/ # Custom React hooks for data fetching
│ ├── pages/ # Route page components
│ └── lib/ # Utilities and query client
├── server/ # Express backend
│ ├── index.ts # Server entry point
│ ├── routes.ts # API route handlers
│ ├── storage.ts # Database access layer
│ └── auth.ts # Authentication setup
├── shared/ # Shared code between client/server
│ ├── schema.ts # Drizzle database schema
│ └── routes.ts # API route type definitions
- Storage Interface:
IStorageinterface inserver/storage.tsabstracts database operations - Shared Types: Schema types and route definitions shared between frontend and backend via
@sharedpath alias - Type-Safe API: Zod schemas define request/response types for all API endpoints
- PostgreSQL: Primary database, connection via
DATABASE_URLenvironment variable - connect-pg-simple: PostgreSQL session store for production
- shadcn/ui: Pre-built accessible components using Radix UI primitives
- Radix UI: Headless UI primitives for dialogs, dropdowns, tabs, etc.
- Lucide React: Icon library
- Recharts: Dashboard analytics charts
- Multer: File upload handling for bulk problem import
- xlsx: Excel file parsing for bulk uploads
- Vite: Development server with HMR
- esbuild: Production build bundling for server
- Drizzle Kit: Database migration tooling