Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/basinghse/nest-react-monorepo
A template for a performant monorepo
https://github.com/basinghse/nest-react-monorepo
authentication monorepo nest react supabase typescript vite
Last synced: 11 days ago
JSON representation
A template for a performant monorepo
- Host: GitHub
- URL: https://github.com/basinghse/nest-react-monorepo
- Owner: basinghse
- Created: 2024-10-13T04:50:06.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2025-02-01T09:42:58.000Z (12 days ago)
- Last Synced: 2025-02-01T10:26:16.723Z (12 days ago)
- Topics: authentication, monorepo, nest, react, supabase, typescript, vite
- Language: TypeScript
- Homepage: https://nest-react-monorepo-web.vercel.app
- Size: 12.6 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# nest-react-monorepo
A full stack appliation with user authentication and lightning fast build times.
## Architecture
- [React](https://react.dev/reference/react) frontend built with [vite](https://vitejs.dev) as a Single Page Application (SPA)
- [Frontend](apps/web)
- [NestJS](https://docs.nestjs.com/first-steps) backend which serves up the frontend
- [Backend](apps/api)
- [Supabase](https://supabase.com/docs) (free Firebase alternative) for user authentication. It can also provide a database
- [Turborepo](https://turbo.build/repo/docs) for managing the frontend and backend together## Re-creating this project
Low level details may be omitted in the steps below. You are encouraged to:
1. Look through the final code or the commit history and try to work it out for yourself
2. Refer to the latest documentation
3. Create an issue or reach out for help### Steps
- Initialise project and define package.json
- `npm init`
- Install turbo monorepo
- `npm install -D turbo`
- Create a `turbo.json` file in root
- Read: latest turbo docs
- Setup workspaces folder/s in `package.json`
- Read: what is workspaces?
- Create the workspace folder in your root directory
- Create backend
- Install nest global cli with `npm install -g @nestjs/cli`
- Navigate to workspace folder
- Run `nest new api --skip-git`
- `--skip-git` is important if your project already has git initialised to prevent a nested git repository
- Create frontend
- Navigate to workspace folder if not already there
- Clone the following template with your desired folder name and remove the `.git` directory created:
- `git clone --no-git https://github.com/mmvergara/react-supabase-auth-template web`
- `rm -rf web/.git`; or navigate and delete via finder/file explorer
- Setup a Supabase project and connect it with the frontend using the instructions [here](apps/web//README.md#getting-started)
- In the backend `package.json` - update `start:dev` script to `dev`
- This allows both dev scripts to be run together with turbo (`npm run dev`)