Getting the BAP Beta Tau frontend running locally takes about five minutes. The project is a standard Vite + React SPA with no monorepo tooling complexity — you clone the repo, create aDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/asubap/website/llms.txt
Use this file to discover all available pages before exploring further.
.env file with the three required variables, install Node dependencies, and start the dev server. The dev server runs on http://localhost:5173 by default and supports hot module replacement (HMR) for instant feedback while you work. Before you begin, make sure you have Node.js 18 or later and either npm or pnpm installed on your machine.
Prerequisites
Node.js ≥ 18
The build toolchain (Vite, TypeScript, ESLint) requires Node 18+. Check with
node -v.npm or pnpm
The lockfile in the repo is
package-lock.json (npm). You can also use pnpm — just run pnpm install instead.Git
You need Git to clone the repository. If you are a chapter contributor, request access to the GitHub org from an e-board officer.
Setup Steps
Clone the repository
Clone the monorepo and navigate into the frontend package. The frontend lives inside the
Frontend/ directory.If you are working from a fork, replace the URL with your fork’s remote. Make sure to set the upstream remote so you can pull in upstream changes:
git remote add upstream https://github.com/asubap/website.git.Install dependencies
Install all Node dependencies. The project uses a flat This installs both
node_modules in Frontend/ — there is no workspace hoisting.- npm
- pnpm
dependencies (runtime) and devDependencies (TypeScript, ESLint, Vite plugins). Expect around 300–400 packages.Create your environment file
Copy the example below into a new file named See the Environment Variables guide for where to find each value.
.env at the root of Frontend/. Never commit this file — it is already listed in .gitignore.Start the development server
Run the Vite dev server. It starts at You should see output similar to:Open
http://localhost:5173 and proxies nothing by default — your VITE_BACKEND_URL value points directly to the live or staging API.http://localhost:5173 in your browser. The app will hot-reload on any file save.Available Scripts
All scripts are defined inFrontend/package.json and run via npm run <script>.
| Script | Command | Description |
|---|---|---|
dev | vite | Starts the Vite HMR dev server on port 5173. |
build | tsc -b && vite build | Type-checks the project with the TypeScript compiler, then produces an optimized production bundle in dist/. |
preview | vite preview | Serves the production dist/ build locally so you can verify the bundle before deploying. |
lint | eslint . | Runs ESLint across all .ts and .tsx files using the config in eslint.config.js. |
Verifying Your Setup
Once the dev server is running, confirm the following to ensure everything is wired correctly:- Homepage loads —
http://localhost:5173/should render the public homepage with the BAP logo and navigation bar. - Login page works —
http://localhost:5173/loginshould show the Google OAuth button. Clicking it will redirect to your Supabase project’s OAuth consent screen. - API connectivity — After logging in, the app makes a
POST /usersrequest toVITE_BACKEND_URL. Open the browser’s Network tab and confirm it returns a200with a role payload. If it returns401or403, your Supabase token may not match a registered user in the backend.
If the Google OAuth redirect fails locally, verify that
http://localhost:5173 is listed as an allowed redirect URL in your Supabase project’s Authentication → URL Configuration settings.Common Issues
Port 5173 is already in use
Port 5173 is already in use
Another Vite process (or any service) is bound to port 5173. Kill it with
lsof -ti:5173 | xargs kill -9 on macOS/Linux, or pass a custom port: npm run dev -- --port 3000.Environment variables are undefined at runtime
Environment variables are undefined at runtime
Make sure your
.env file is at Frontend/.env (not the repo root) and that every variable name starts with VITE_. Restart the dev server after creating or modifying .env — Vite does not hot-reload env files.Google OAuth redirect goes to the wrong URL
Google OAuth redirect goes to the wrong URL
Add
http://localhost:5173 to the Redirect URLs list in Supabase → Authentication → URL Configuration. Without this, Supabase will block the OAuth callback.TypeScript errors on npm install
TypeScript errors on npm install
If you see errors like
Cannot find module, run npm run build to see the full tsc output. The project targets TypeScript ~5.7.2 — using an older global tsc will cause version mismatches. The locally installed version in node_modules/.bin/tsc is always used by the build script.