The frontend for the NUSCC Website.
- Frontend: Next.js, React, TypeScript
- Database: Prisma, Supabase
- Styling: Tailwind CSS, Shadcn UI components
- Node.js (v22+)
- pnpm
- Any tool to expose localhost to https endpoints, such as ngrok or tunnl.gg
- This guide will be assuming you are using ngrok
-
Set up your Telegram dev bot
- Go to @BotFather on Telegram
- Run
/newbot - Enter a username for the bot (e.g. nusc_web_dev_bot) -> BotFather will send with a BOT_TOKEN e.g. XXXXXXXX
- In your
.envfile, set the following variables:- Set
BOT_TOKENwith the token given by @BotFather - Set
NEXT_PUBLIC_TELEGRAM_LOGIN_BOTwith your bot username
- Set
-
Clone the repository:
git clone https://github.com/usdevs/NUSCweb cd NUSCweb -
Install dependencies:
pnpm install
-
Setup your environment variables in
.envfile, with.env.examplefor reference -
Expose your localhost port:
ngrok http 3000
- Retrieve your custom HTTPS URL (e.g. https://xxx.ngrok.io)
- In @BotFather, run
/setdomain, choose your nusc dev bot, and enter the ngrok URL
-
Run the development server:
pnpm dev
-
Access our dev server via the ngrok HTTPS URL (e.g. https://xxx.ngrok.io)
- If you see "Bot domain invalid" on the top nav bar, ensure your accessing your dev environment via the ngrok HTTPS URL, not your localhost