Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: add comprehensive documentation #19

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 59 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# npo-template-merged

## Quickstart

### 1. Clone this repository, then `cd` into the directory

```shell
> git clone https://github.com/ctc-uci/npo-template-merged.git
> cd npo-template-merged
```

> [!TIP]
> `npo-template-merged` is a template repository. [You can create a copy through Github.](https://docs.github.com/en/repositories/creating-and-managing-repositories/creating-a-repository-from-a-template)

### 2. Install dependencies

Install [Node.js, version 18.20.4)](https://nodejs.org/en/download/package-manager).

> [!TIP]
> On MacOS and Linux, installing Node with `nvm` is recommended!

Install [Yarn](https://classic.yarnpkg.com/lang/en/), our package manager of choice.

```shell
> npm install --global yarn
```

Now, install packages:

```shell
> yarn install
```

> [!TIP]
> This monorepo uses [Yarn Workspaces](https://classic.yarnpkg.com/lang/en/docs/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.

### 3. Get environment secrets

Both the `client` and `server` directories have their own `env.local` and `.env` files, respectively. If you're a general member, these secrets should be provided to you by your tech leads.

For this quickstart, `client` secrets consist mostly of Firebase secrets, which can be created in the [Firebase console](https://console.firebase.google.com/). `server` secrets consist mostly of database connection strings and can be created with your choice of database provider (in CTC's case, usually AWS).

Examples of what your secrets should look like are provided in `client/.env.example` and `server/.env.example`.

### 4. Start developing!

Start the development server by running this command:

```shell
> yarn dev
```

## Client
The frontend repository is built with Vite, React, and Typescript.

## Server
The backend respository is built with Node.js, Express.js, and your choice of database (SQL/NoSQL). This template uses PostgreSQL by default, but both MySQL and MongoDB are available as plug-and-play options as well.