Skip to content

Onboarding

David Zhu edited this page Mar 25, 2024 · 3 revisions

Installation and Setup

Ensure you have the latest LTS version installed, as Next.js is a Node-based framework.

Version control is crucial, so install Git for repository management.

Visual Studio Code (or your preferred IDE)

VS Code is recommended for its excellent support for JavaScript and React.

If you're using VSCode, also install the following recommended extensions.

While npm is bundled with Node.js, we use pnpm for its efficiency.

Postman (OPTIONAL)

Postman is great for testing APIs

You can install either Github Desktop or GitKraken. These programs allow you to easily do version control without the CLI.


Running the project

To get started with the project, follow these steps:

Clone the repository

git clone https://github.com/UoaWDCC/uabc-portal.git

Navigate to the project root and install dependencies.

pnpm install

Create the .env file and update the relevant fields

cp .env-example .env
  • DATBASE_URL
  • GOOGLE_CLIENT_ID
  • GOOGLE_CLIENT_SECRET
  • NEXTAUTH_URL
  • NEXTAUTH_SECRET
  • ENVIRONMENT

Then, run the development server:

pnpm dev

The app is running on http://localhost:3000.


Other useful commands:

Run this open up storybook for component documentation.

pnpm storybook

Run this to bring up Drizzle Studio (This is a very useful database viewer)

pnpm drizzle-kit studio

Run this to push your schema changes to the database

pnpm db:push

Version control

Have a look at this to learn about the GitHub flow branching strategy. How to create a branch and merge that branch into main. This is covered more in depth under Ticket Lifecycle on the admin page.

You can also use this cheat sheet to learn about git commands.


Useful Resources

Tech Stack

Component Documentation

Other reads