Alumni–Student Engagement Platform
Live Demo: https://aluminate-syvf.onrender.com
Aluminate is a MERN-based alumni networking platform designed to strengthen engagement between college students and alumni.
Key Features
- JWT-based authentication using HTTP-only cookies
- Alumni–student interaction and networking
- Well-structured MongoDB schemas
- Optimized database queries using indexes
- Full-stack MERN architecture (React + Express + MongoDB + Node.js)
Tech Stack
| Layer | Stack |
|---|---|
| Frontend | React 19, Vite 7, Tailwind CSS v4, React Router v7, React Hook Form + Zod |
| Backend | Node.js 20, Express 5, Mongoose 8, JWT, bcrypt |
| Database | MongoDB Atlas |
| Container | Docker + Docker Compose, nginx (static serving) |
npm run install:allThis step is required — the server will not start without it.
Create server/.env by copying the example file, then fill in your values:
cp server/.env.example server/.envOpen server/.env and replace the MONGODB_URI placeholders with your actual MongoDB
username and password. Do not rename any of the variables.
| Variable | Description |
|---|---|
NODE_ENV |
development or production |
CORS_ORIGIN |
Frontend origin (http://localhost:5173 locally) |
PORT |
Backend port (default 5000) |
MONGODB_URI |
MongoDB Atlas connection string |
JWT_ACCESS_TOKEN_SECRET |
Secret for signing access tokens |
JWT_REFRESH_TOKEN_SECRET |
Secret for signing refresh tokens |
JWT_ACCESS_TOKEN_AND_COOKIE_EXPIRES_IN |
Access token lifetime (e.g. 1d) |
JWT_REFRESH_TOKEN_AND_COOKIE_EXPIRES_IN |
Refresh token lifetime (e.g. 30d) |
ACCESS_AND_REFRESH_TOKEN_COOKIE_SAME_SITE |
Cookie SameSite policy (e.g. lax) |
⚠️ Never put real credentials inserver/.env.example— that file is tracked by git. Onlyserver/.envis gitignored.
Run from the root directory
Starts the React frontend
npm run dev:clientStarts the Express backend
npm run dev:serverStarts both frontend and backend concurrently (if configured)
npm run dev:allMake sure
concurrentlyis installed if usingnpm run dev:all.
The frontend runs on http://localhost:5173 and the backend on http://localhost:5000.
The project ships with a full container setup, so you can run the entire stack without installing Node.js or matching versions locally.
- Docker Engine + Docker Compose plugin
- On Windows/WSL2: Docker Desktop with WSL integration enabled for your distro
server/.envmust exist (see Configure Environment Variables) — Compose reads it at startup
docker compose up --build| Service | URL | Description |
|---|---|---|
client |
http://localhost:5173 | React build served by nginx |
server |
http://localhost:5000 | Express API |
Wait for MongoDB connected in the server logs before using the app.
docker compose up -d --build # rebuild and start in the background
docker compose logs -f server # tail the backend logs
docker compose restart server # restart after changing server/.env
docker compose down # stop and remove containersserver/dockerfile— installs production dependencies onnode:20-slimand runs the Express app as the non-rootnodeuser.client/dockerfile— multi-stage build: compiles the Vite bundle in Node, then serves the static output from a lightweightnginx:alpineimage.client/nginx.conf— serves the SPA with atry_files ... /index.htmlfallback so deep links like/dashboard/profilework on refresh, and caches hashed assets.
Ports conflict with the dev servers. Docker binds 5000 and 5173, the same ports
npm run dev:all uses. Stop the dev servers before running docker compose up, or remap
the ports in docker-compose.yml.
VITE_API_BASE_URL is baked in at build time. Vite inlines import.meta.env values
during npm run build, so this is passed as a build arg in docker-compose.yml, not a
runtime environment variable. Changing it requires a rebuild:
docker compose up -d --buildIt must also point at a host-reachable URL — the bundle runs in the user's browser, so
http://server:5000 (the internal Compose hostname) will not resolve.
Source changes need a rebuild. Application code is copied into the images, so docker compose up alone won't pick up edits. Use npm run dev:all for day-to-day development
with hot reload, and Docker for testing production builds and deployment.
injecting env (0) from .env in the logs is expected. server/.env is excluded from
the image by .dockerignore; the real values are supplied by Compose's env_file.
MongoDB Atlas IP allowlist. Containers share your host's outbound IP, so your existing Atlas allowlist entry keeps working with no changes.
