Welcome to the JGEC Alumni Association platform repository. This project consists of a main public-facing frontend, an admin dashboard, and a robust Node.js backend. The entire stack is containerized using Docker for seamless local development and production deployment.
The platform is a monolithic repository containing three primary services:
The backend provides comprehensive Swagger API documentation for all endpoints:
jgec-alumni/
├── Jgec-Alumni-Frontend/ # Next.js Public Frontend
│ ├── src/ # Source code (pages, components, styles)
│ ├── public/ # Static assets
│ ├── next.config.mjs # Next.js configuration
│ └── tailwind.config.ts # Tailwind CSS configuration
├── Jgec-alumni-admin/ # Next.js Admin Dashboard
│ ├── src/ # Source code
│ ├── public/ # Static assets
│ └── next.config.mjs # Next.js configuration
├── Jgec_Alumni_Backend/ # Node.js/Express API Backend
│ ├── prisma/ # Prisma schema and migrations
│ ├── src/controller/ # API Controllers
│ ├── src/router/ # API Routes
│ ├── src/middleware/ # Custom middlewares
│ └── index.ts # Application entry point
├── docker-compose.yml # Docker Compose for Local Development
├── docker-compose.prod.yml # Docker Compose for Production
├── .env # Environment Variables (Secrets)
└── README.md # Project Documentation
.env)You need a .env file at the root of the project. Below is the list of required variables. Do not commit actual secrets to version control.
# Database Configuration
DATABASE_URL="mysql://<user>:<password>@<host>:<port>/<db_name>"
# Authentication
JWT_SECRET="your_jwt_secret_key"
# CORS & URLs
FORNTEND_URI_DEV="http://localhost:4000"
FORNTEND_URI_PROD="https://admin.jgecalumni.in"
FORNTEND_URI_MAIN="https://jgecalumni.in"
FORNTEND_URI_MAIN_TWO="https://www.jgecalumni.in"
FORNTEND_URI_ADMIN_DEV="http://localhost:3000"
# Email Configuration (Nodemailer)
EMAIL_USERNAME="your_email@gmail.com"
EMAIL_PASSWORD="your_app_password"
MONEY_EMAIL="receipt_email@gmail.com"
MONEY_PASSWORD="receipt_app_password"
# Cloudinary (Image Storage)
CLOUDINARY_CLOUD_NAME="your_cloud_name"
CLOUDINARY_API_KEY="your_api_key"
CLOUDINARY_API_SECRET="your_api_secret"
# Initial Admin Credentials
ADMIN_EMAIL="admin@example.com"
ADMIN_PASSWORD="admin_password"
# Google Sheets / Service Account (Frontend envs)
CLIENT_EMAIL="service-account@..."
CLIENT_ID="your_client_id"
PRIVATE_KEY="-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----\n"
SPREADSHEET_ID="your_spreadsheet_id"
# Application URLs & Configs
NEXT_PUBLIC_API_URL="/v1/api"
NEXT_PUBLIC_BACKEND_URL="http://localhost:8000"
INTERNAL_BACKEND_URL="http://backend:8000"
REDIS_URL="redis://redis:6379"
GENERATE_SOURCEMAP="false"
GITHUB_REPOSITORY_LOWER="jgecalumni/jgec-alumni"
(Note: The Next.js apps receive NEXT_PUBLIC_API_URL and NEXT_PUBLIC_BACKEND_URL as build arguments via Docker Compose.)
The easiest way to run the entire stack locally is using Docker Compose.
3000, 4000, 8000, and 6379 are free on your local machine.cd jgec-alumni
.env file in the root directory and fill it with your development values (as shown above).docker-compose -f docker-compose.yml up --build
For production, the deployment uses docker-compose.prod.yml, which pulls pre-built Docker images from GitHub Container Registry (GHCR) instead of building them from source on the server.
docker-compose.prod.yml and your production .env file to the server.echo $CR_PAT | docker login ghcr.io -u YOUR_GITHUB_USERNAME --password-stdin
docker-compose -f docker-compose.prod.yml up -d
3000, 4000, and 8000 to handle SSL (HTTPS) termination.If you prefer to run services individually without Docker:
cd Jgec_Alumni_Backend
npm install # or pnpm install / yarn install
npx prisma generate
npm run dev
cd Jgec-Alumni-Frontend
npm install
npm run dev
cd Jgec-alumni-admin
npm install
npm run dev
(Note: You will also need to have a Redis instance and MySQL database running locally and update your .env accordingly).