Skip to content

call-0f-code/codenest

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

291 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

CodeNest

CodeNest is a comprehensive member management and collaboration platform built for the Call of Code (CoC) club. This application helps club members track their progress, share interview experiences, manage DSA topics, and build their professional profiles.

🎯 Features

  • User Profiles: Build and showcase professional profiles
  • Interview Experiences: Share and browse interview experiences
  • DSA Dashboard: Track Data Structures and Algorithms progress
  • Progress Tracking: Monitor individual learning progress
  • Topic Management: Organize and track various CS topics

πŸ› οΈ Tech Stack

Frontend

  • React - UI library
  • Vite - Build tool
  • TailwindCSS - Styling
  • React Router - Navigation
  • Axios - HTTP client
  • React Query - Data fetching
  • React Hot Toast - Notifications
  • Radix UI - Component primitives

Backend

  • Bun - JavaScript runtime
  • Express - Web framework
  • TypeScript - Type safety
  • JWT - Authentication
  • Zod - Schema validation
  • Helmet - Security middleware
  • Rate Limiting - API protection

🐳 Docker (Recommended)

The easiest way to run the full stack β€” no Bun or Node required on your host machine.

Quick Start

# 1. Set up the COC API env (gitignored β€” copy template and fill in Supabase credentials)
cp docker/.env.example.coc-api docker/.env.local.coc-api

# 2. Review/edit the backend and frontend env files (safe defaults pre-filled)
docker/.env.local.backend
docker/.env.local.frontend

# 3. Build images and start all three services
docker compose up --build

# 4. Enable hot-reload during development (file changes sync automatically)
docker compose up --build --watch
Service URL
Member Frontend http://localhost:5173
Member Backend API http://localhost:8000
COC API http://localhost:3000

For the full setup guide β€” environment variables, CI/CD, watch mode, and troubleshooting β€” see DOCKER.md.


πŸ’» Local Development (without Docker)

Prerequisites

  • Bun (v1.2.18 or higher)
  • Git

1. Clone the Repository

git clone https://github.com/call-0f-code/codenest.git
cd codenest

2. Install Dependencies

# Install all dependencies (root, backend, and frontend)
bun run install:all

Or install them separately:

bun install              # root
bun run install:backend  # backend
bun run install:frontend # frontend

3. Environment Setup

Backend

cd backend
cp .env.example .env
# Open .env and fill in the required values
Variable Description
JWT_SECRET Secret for signing access tokens
REFRESH_SECRET Secret for signing refresh tokens
SALTING bcrypt cost factor (e.g. 8)
API_URL COC API base URL β€” use http://localhost:3000 for local dev
PORT Backend port (default 8000)
NODE_ENV Set to production for secure refresh-token cookies
ALLOWED_ORIGINS Comma-separated allowed CORS origins
RATE_LIMIT_WINDOW_MINUTES Rate-limit window in minutes
RATE_LIMIT_MAX_REQUESTS Max requests per window
EMAIL_ID Sender address for outgoing emails
CONTACT_EMAIL_ID Club contact email
RESEND_API_KEY API key from resend.com
ACCESS_TTL Access token lifetime in minutes (e.g. 15)
REFRESH_TTL Refresh token lifetime in days (e.g. 7)

Frontend

cd frontend
cp .env.example .env
Variable Description
VITE_API_URL Backend URL visible from the browser (e.g. http://localhost:8000)

4. Run the Application

# Run both frontend and backend concurrently
bun run dev

Or run them separately:

bun run backend-dev   # backend only
bun run frontend-dev  # frontend only

Access the Application


πŸ“ Project Structure

codenest/
β”œβ”€β”€ docker-compose.yml           # Docker Compose stack
β”œβ”€β”€ docker/                      # Dockerfiles and env templates
β”‚   β”œβ”€β”€ Dockerfile.backend
β”‚   β”œβ”€β”€ Dockerfile.frontend
β”‚   β”œβ”€β”€ .env.example.coc-api
β”‚   β”œβ”€β”€ .env.local.backend
β”‚   β”œβ”€β”€ .env.local.coc-api       # gitignored β€” copy from .env.example.coc-api
β”‚   └── .env.local.frontend
β”œβ”€β”€ backend/                     # Backend application
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ config/             # Configuration files
β”‚   β”‚   β”œβ”€β”€ controllers/        # Route controllers
β”‚   β”‚   β”œβ”€β”€ middleware/         # Custom middleware
β”‚   β”‚   β”œβ”€β”€ routes/             # API routes
β”‚   β”‚   β”œβ”€β”€ types/              # TypeScript types
β”‚   β”‚   β”œβ”€β”€ utils/              # Utility functions
β”‚   β”‚   β”œβ”€β”€ validation/         # Input validation
β”‚   β”‚   β”œβ”€β”€ app.ts              # Express app setup
β”‚   β”‚   └── server.ts           # Server entry point
β”‚   β”œβ”€β”€ .env.example
β”‚   └── package.json
β”œβ”€β”€ frontend/                    # Frontend application
β”‚   β”œβ”€β”€ public/                 # Static assets
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ assets/             # Images, fonts, etc.
β”‚   β”‚   β”œβ”€β”€ components/         # React components
β”‚   β”‚   β”œβ”€β”€ context/            # React context
β”‚   β”‚   β”œβ”€β”€ hooks/              # Custom hooks
β”‚   β”‚   β”œβ”€β”€ lib/                # Libraries
β”‚   β”‚   β”œβ”€β”€ pages/              # Page components
β”‚   β”‚   β”œβ”€β”€ routes/             # Route configuration
β”‚   β”‚   β”œβ”€β”€ utils/              # Utility functions
β”‚   β”‚   └── App.jsx             # Main App component
β”‚   β”œβ”€β”€ .env.example
β”‚   └── package.json
└── package.json                 # Root package.json (workspace scripts)

πŸ”§ Development

Linting

# Backend
cd backend
bun run lint
bun run lint:fix   # auto-fix

# Frontend
cd frontend
bun run lint

Code Formatting

cd backend
bun run format

πŸ—οΈ Building for Production

cd frontend
bun run build    # production build
bun run preview  # preview the build locally

πŸ“ API Documentation

The backend API is available at /api/v1 with the following endpoints:

  • Members: User and member management
  • Interview: Interview experience sharing
  • Progress: Progress tracking
  • Topics: Topic management

A health check endpoint is available at /health.


🀝 Contributing

This is a private repository for Call of Code club members. If you're a member and want to contribute:

  1. Create a feature branch
  2. Make your changes
  3. Test your changes thoroughly
  4. Submit a pull request

πŸ“§ Support

For questions or issues, please contact the Call of Code club administrators or create an issue in the repository.

πŸ“„ License

This project is private and intended for use by Call of Code club members only.


Built with ❀️ by the Call of Code community

About

Call of Code members website

Resources

Stars

Watchers

Forks

Contributors

Languages

  • JavaScript 86.8%
  • TypeScript 11.0%
  • CSS 2.0%
  • HTML 0.2%