A simple React, Vite, and Node.js monorepo built with Yarn workspaces. Uses Firebase for authentication, Chakra UI for components, and your choice of database (i.e. Postgres).
git clone https://github.com/ctc-uci/npo-template-merged.git
cd npo-template-mergedWarning
If you're a developer, you probably won't be cloning npo-template-merged. Replace npo-template-merged with the name of your team's repository.
Tip
npo-template-merged is a template repository. You can create a copy through Github.
Install Node.js, (version 18.20.4).
Tip
On MacOS and Linux, installing Node with nvm is recommended!
Install Yarn, our package manager of choice.
> npm install --global yarnNow, install packages:
> yarn installTip
This monorepo uses Yarn Workspaces to manage dependencies across repositories. Unless you know what you're doing, you should install dependencies (yarn install) at the root of the repository (i.e. not in /client or /server).
However, you should add new dependencies (yarn add) in the directory which actually uses them.
Both the client and server directories have their own .env.local and .env files, respectively. These secrets should be provided to you by your tech leads.
Client
The client .env consists primarily of your Firebase secrets. An example is provided in /client/.env.example. Copy the contents into a new file named .env.local, then fill in the keys with the appropriate values.
Tip
The code block below is an example of what your .env.local should (partially) look like.
VITE_FIREBASE_APIKEY=my-api-key
VITE_FIREBASE_AUTHDOMAIN=my-project.firebaseapp.com
VITE_FIREBASE_PROJECTID=my-project-id
...Server
The server .env consists primarily of your database secrets. An example is provided in /server/.env.example. Copy the contents into a new file named .env, then fill in the keys with the appropriate values.
Start the development server by running this command:
yarn run dev