BuildMyTeam is a production-oriented web platform for colleges to manage hackathons, teams, participants, and collaboration resources in one place.
It provides:
- Secure authentication with pending-user approval flow
- Role-based access for Admin, Team Leader, and Member
- Team creation, join-by-code, join-request review, and member management
- Team workspace with project links, QR join, and notifications
- Admin operations for users, teams, and hackathons
- Frontend: React (Vite), React Router, Tailwind CSS, TanStack Query
- Backend: Node.js, Express.js
- Database: MongoDB with Mongoose
- Auth: JWT + bcrypt
- Validation: Zod
- Testing: Jest + Supertest + mongodb-memory-server (backend)
frontend/React app (Vercel-ready)backend/Express API (Render-ready)render.yamlRender deployment blueprint for backend
-
Authentication
- User signup and login
- Password hashing with bcrypt
- JWT-based route protection
- Pending status for new users
- Admin approval/rejection for account activation
-
Hackathons
- Admin CRUD for hackathon listings
- Public and authenticated listing
- External-link redirect usage
-
Team Management
- Approved users can create teams
- Team fields include project/resource links
- Unique 4-5 digit join code per team
- Join by code with approval/rejection workflow
- Max team size enforcement
- Remove members and transfer leadership
-
Team Workspace
- Team member roster
- GitHub, Excalidraw, WhatsApp, and hackathon links
- Leader-editable details
- Join QR generation for team code sharing
-
Notifications
- Join request alerts
- Approval/rejection alerts
- Team update alerts
- Read/unread tracking
-
User Profile
- Name, email, global role, status
- Teams joined
- Hackathons participated
-
Admin Dashboard
- View users, teams, and hackathons
- Approve/reject users
-
Discovery UX
- Team search by name/project
- Filter teams by hackathon
- Node.js 20+
- MongoDB (local or Atlas)
# from project root
cd backend
npm install
cd ../frontend
npm installCreate backend env file:
cd backend
cp .env.example .envSet values in backend/.env:
NODE_ENV=developmentPORT=5000MONGODB_URI=mongodb://localhost:27017/buildmyteamJWT_SECRET=<your_secret>JWT_EXPIRES_IN=7dCLIENT_URL=http://localhost:5173,http://localhost:5174ADMIN_SYNC_ON_STARTUP=true(optional for local bootstrap only)
Create frontend env file:
cd frontend
cp .env.example .envSet values in frontend/.env:
VITE_API_URL=http://localhost:5000/api
In terminal 1:
cd backend
npm run devIn terminal 2:
cd frontend
npm run devFrontend runs at http://localhost:5173.
Backend (backend/package.json):
npm run devstart with nodemonnpm startproduction startnpm run lintESLintnpm testJest + Supertest API tests
Frontend (frontend/package.json):
npm run devVite dev servernpm run buildproduction buildnpm run previewpreview buildnpm run lintESLint
Base URL: http://localhost:5000/api
Key route groups:
/authsignup, login, me/adminusers review/list, team/hackathon oversight/hackathonslist + admin CRUD/teamscreate/list/edit/member ops/leader transfer/QR/join-requestsrequest by code, pending review, approve/reject/notificationslist/read/read-all/profilecurrent user profile aggregate
Admin access is fully implemented.
- Login page: /login
- Admin portal route: /admin
- Access rule: only users with role=admin can open /admin
How admin account is created:
- Automatic bootstrap:
- The very first signup in an empty database becomes admin and approved automatically.
- Manual create/reset command:
- You can create a new admin or promote/reset an existing user at any time.
Command:
cd backend npm run admin:create -- --name="Admin" --email="admin@college.edu" --password="StrongPass123!"
What this command does:
- If email exists: sets role to admin, status to approved, and resets password.
- If email does not exist: creates a new approved admin user.
Admin portal capabilities currently available:
- View all users
- Filter users by status
- Approve or reject pending users
- View all teams overview
- View all hackathons
- Create hackathons
- Edit hackathons
- Delete hackathons
Security notes for admin:
- Use a strong admin password.
- Never commit backend/.env.
- Rotate credentials if they are shared in logs or chat.
Use render.yaml in the project root.
Required Render env vars:
MONGODB_URIJWT_SECRETCLIENT_URL(your Vercel frontend URL, comma-separated if needed)
Recommended Render env vars:
JWT_EXPIRES_IN=7dADMIN_SYNC_ON_STARTUP=falseMONGO_SERVER_SELECTION_TIMEOUT_MS=15000DB_FALLBACK_TO_MEMORY=true(temporary safety fallback if Atlas is unreachable)
Render deploy steps:
- Push code to GitHub.
- In Render dashboard, create a new Blueprint from repository.
- Confirm service uses:
- Root directory: backend
- Build command: npm ci
- Start command: npm start
- Set required environment variables in Render service.
- Deploy and wait for build to complete.
- Verify backend health URL:
- Verify API base URL:
Two Vercel deployment modes are supported:
- Repository-root deployment (default-safe for this monorepo):
- Uses root
vercel.json - Runs
npm ci --prefix frontendandnpm run build --prefix frontend - Prevents
npm cilockfile errors at repository root
- Uses root
- Frontend-root deployment:
- Set project Root Directory to
frontend - Uses
frontend/vercel.json
- Set project Root Directory to
Vercel deploy steps:
- Import the same repository in Vercel.
- Choose one deployment mode:
- Keep Root Directory as repository root (recommended), or
- Set Root Directory to
frontend.
- Set environment variable:
VITE_API_URL=https://buildmyteam.onrender.com/api
- Build and deploy.
- Open deployed app and test login/register.
Note: this repository also includes a Vercel rewrite from /api/* to https://buildmyteam.onrender.com/api/*, so deployment can still work even if VITE_API_URL is not set.
Required Vercel env var:
VITE_API_URL=https://<your-render-backend>/api
After frontend deploy, update backend CLIENT_URL in Render:
CLIENT_URL=https://buildmyteam.vercel.app
If you need preview deployments to call backend, add additional origins in CLIENT_URL separated by commas.
- Backend health endpoint returns 200.
- Frontend loads without blank screen.
- Register endpoint works from deployed frontend.
- Admin login works and admin panel loads.
- Create/edit/delete hackathon works.
- Team create/edit/delete works for creator/admin.
- Non-creator cannot edit/delete another team.
- CORS has no browser errors in Network tab.
- Passwords are hashed with bcrypt before storage
- Sensitive routes use JWT auth middleware
- Admin-only routes are protected with role middleware
- Pending users are blocked from approved-user actions
- Input payloads are validated with Zod
- Helmet, CORS, and rate limiting are enabled
Backend test coverage includes:
- Pending approval restrictions
- RBAC on admin endpoints
- Join request validation and review flow
Run:
cd backend
npm test- Set strong
JWT_SECRET - Use MongoDB Atlas or managed Mongo for production
- Set
CLIENT_URLto deployed frontend domain - Set
VITE_API_URLto deployed backend API base - Set
ADMIN_SYNC_ON_STARTUP=falsein production - Keep
.envfiles out of version control
ISC