Admin Dashboard for Call of Code
COC-Admin is the administrative web application for managing the Call of Code platforms (callofcode.in and members.callofcode.in). This application provides a comprehensive dashboard for administrators to manage users, projects, achievements, DSA questions, and other platform resources.
This admin application serves as the central management system, enabling administrators to:
- Manage user accounts and member profiles
- Create and organize DSA (Data Structures & Algorithms) questions
- Oversee project submissions and showcases
- Track and award achievements
- Manage topics and categories
- Monitor platform activity and analytics
This is a monorepo containing both frontend and backend applications:
COC-Admin/
βββ frontend/ # React + TypeScript + Vite frontend
βββ backend/ # Express + Bun backend API
βββ package.json # Root package with dev scripts
βββ README.md # This file
- Framework: React 19 with TypeScript
- Build Tool: Vite 7
- Styling: Tailwind CSS 4
- UI Components: shadcn/ui
- State Management: TanStack Query (React Query)
- Routing: React Router v7
- Authentication: JWT
- Icons: Lucide React
- Animations: Framer Motion
- Notifications: React Hot Toast
- Runtime: Bun
- Framework: Express 5
- Language: TypeScript
- Authentication: JWT
- Validation: Zod
- Security: Helmet, CORS, Rate Limiting
- Password Hashing: bcrypt
- File Uploads: Multer
- Package Manager: Bun
- Linting: ESLint
- Code Formatting: Prettier
- Git Hooks: Husky + lint-staged
- Concurrent Dev: concurrently
- View and manage admin users
- Member profile management
- User authentication and authorization
- Create, edit, and delete DSA questions
- Organize questions by topics and difficulty
- Question metadata management
- Review and manage project submissions
- Project approval workflow
- Project showcase organization
- Create and manage achievement badges
- Award achievements to users
- Track achievement statistics
- Organize content by topics
- Manage category hierarchies
- Tag-based filtering
- Bun (v1.2.18 or higher)
- Node.js (for compatibility)
- Git
-
Clone the repository
git clone https://github.com/call-0f-code/COC-Admin.git cd COC-Admin -
Install root dependencies
bun install
-
Install frontend dependencies
cd frontend bun install cd ..
-
Install backend dependencies
cd backend bun install cd ..
-
Configure environment variables
Backend (
backend/.env):API_URL=your_api_url SALTING=your_salt_rounds JWT_SECRET=your_jwt_secret RATE_LIMIT_WINDOW_MINUTES=15 RATE_LIMIT_MAX_REQUESTS=100
Refer to
backend/.env.examplefor all available options.
Run both frontend and backend concurrently:
bun run devRun backend only:
bun run backend-dev
# or
cd backend && bun run devRun frontend only:
bun run frontend-dev
# or
cd frontend && bun run devThe frontend will typically run on http://localhost:5173 and the backend on the configured API port.
Backend:
cd backend
bun run lint # Check for issues
bun run lint:fix # Auto-fix issuesFrontend:
cd frontend
bun run lint # Check for issues
bun run lint:fix # Auto-fix issuesBackend:
cd backend
bun run formatFrontend:
cd frontend
bun run formatThis project uses Husky and lint-staged to automatically lint and format code before commits.
backend/
βββ src/
β βββ controllers/ # Request handlers
β βββ routes/ # API routes
β βββ middleware/ # Express middleware
β βββ config/ # Configuration files
β βββ types/ # TypeScript type definitions
β βββ utils/ # Utility functions
β βββ validation/ # Zod validation schemas
β βββ app.ts # Express app setup
β βββ server.ts # Server entry point
βββ package.json
frontend/
βββ src/
β βββ Components/ # React components
β βββ pages/ # Page components
β β βββ AdminDashboard.tsx
β β βββ DsaDashboard.tsx
β β βββ ProjectDashboard.tsx
β β βββ AchievementPage.tsx
β β βββ Authentication.tsx
β βββ hooks/ # Custom React hooks
β βββ utils/ # Utility functions
β βββ types/ # TypeScript types
β βββ assets/ # Static assets
β βββ App.tsx # Main App component
β βββ main.tsx # Entry point
βββ public/ # Public assets
βββ package.json
- JWT Authentication: Secure token-based authentication
- Password Hashing: bcrypt for secure password storage
- Rate Limiting: Protect against brute force attacks
- CORS: Configured cross-origin resource sharing
- Helmet: Security headers for Express
- Input Validation: Zod schemas for request validation
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes
- Lint and format your code
- Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Please ensure your code:
- Follows the existing code style
- Includes appropriate documentation
- Has no linting errors
This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.
- Call of Code Platform - The main platform website
- Call of Code API - Backend API for the main platform
For questions or support regarding the admin dashboard, please contact the Call of Code team.
Made with β€οΈ for the Call of Code community