2026 Discover Program Project Templates
This template was created by the DISC tech leads of 2025-2026:
Check out DISC:
Firebase Authentication + Supabase (PostgreSQL) backend template. Can be migrated to AWS RDS (MySQL) — see SETUP_GUIDE.md.
- Runtime: Node.js with ES Modules
- Framework: Express.js
- Authentication: Firebase Auth (Email/Password + Google OAuth)
- Database: Supabase (PostgreSQL) — switchable to AWS RDS (MySQL)
- Database Client: pg / mysql2 (connection pool, raw SQL with parameterized queries)
- Language: JavaScript (ES Modules)
# Install dependencies
npm install
# Set up environment
cp .env.example .env
# Edit .env with your Firebase credentials and Supabase DATABASE_URL
# Create tables — paste sql/create_tables.sql into the Supabase SQL Editor
# Start development server
npm run devSee SETUP_GUIDE.md for full setup instructions.
POST /auth/signup- Create new userPOST /auth/login- Login with Firebase ID tokenGET /auth/me- Get current userGET /auth/profile- Get current user (alias for/me)GET /auth/users- Get all users (protected)POST /auth/logout- LogoutPOST /auth/token- Sync Firebase OAuth user to database
npm run dev # Start development server
npm run lint # Run ESLint
npm run format # Format all files with PrettierWhen you open this project in VSCode, it will automatically prompt you to
install the recommended extensions from .vscode/extensions.json. Click
Install on the notification, or install them manually:
- Prettier ESLint
(
rvest.vs-code-prettier-eslint) — formats your code using both Prettier and ESLint rules on every save - ESLint
(
dbaeumer.vscode-eslint) — shows lint errors and warnings inline as you type
Once both are installed, restart VSCode completely (quit and reopen). Every
file save will automatically format and lint your code. Format-on-save is
configured in .vscode/settings.json — do not edit this file.
To manually format all files at once:
npm run formatRequired .env variables (see .env.example):
FIREBASE_SERVICE_ACCOUNT_KEY- Firebase service account JSONDATABASE_URL- Supabase PostgreSQL connection stringPORT- Server port (default: 5050)FRONTEND_URL- Production frontend URL for CORSFRONTEND_URL_DEV- Development frontend URL for CORSNODE_ENV- Environment (development/production)
rds-config.ini is only needed when migrating to AWS RDS. See SETUP_GUIDE.md.
js-backend/
├── sql/
│ ├── create_tables.sql # Supabase / PostgreSQL schema (default)
│ └── create_tables_mysql.sql # AWS RDS / MySQL schema (for migration)
├── src/
│ ├── config/
│ │ ├── firebase.js # Firebase Admin SDK
│ │ └── database.js # DB connection pool (Supabase default)
│ ├── controllers/
│ │ └── authController.js # Auth endpoint logic
│ ├── middleware/
│ │ └── authMiddleware.js # Firebase token verification
│ ├── providers/
│ │ ├── postgresProvider.js # Supabase / PostgreSQL queries (default)
│ │ └── mysqlProvider.js # AWS RDS / MySQL queries (for migration)
│ ├── repositories/
│ │ └── userRepository.js # Adapter — swap providers here
│ ├── routes/
│ │ └── authRoutes.js # API routes
│ └── server.js # Express app
├── .env.example # Environment template
├── rds-config.ini.example # AWS RDS config template (for migration)
└── package.json