This repository is a monorepo for all of NCT Hub's services, powered by Turborepo. View our documentation at docs.tuturuuu.com.
apps/web: Main application (rmitnct.club)apps/docs: Documentation website powered by Mintlify
- Node.js (v22+)
- bun (v1.2+) - Install with:
- macOS/Linux:
curl -fsSL https://bun.sh/install | bash - Windows:
powershell -c "irm bun.sh/install.ps1 | iex"
- macOS/Linux:
- Docker (latest)
-
Clone the repository:
git clone https://github.com/rmit-nct/hub.git cd hub -
Configure Tiptap Pro Registry:
This step is no longer needed.
-
Install dependencies:
bun i
-
Start the Supabase local development environment:
bun sb:start
This will provide the necessary URLs and keys for local development.
-
Create environment files:
Create a
.env.localfile in each app directory (apps/*/.env.local) using the corresponding.env.exampletemplate and add the Supabase URLs and keys from the previous step. -
Start the desired application(s):
Use the appropriate bun scripts to start the applications.
bun dev
This turborepo has some additional tools already setup for you:
- Tailwind CSS for styles
- Shadcn UI for UI components
- TypeScript for static type checking
- ESLint for code linting
- Prettier for code formatting
- Vitest for testing
Tip
If you're using VS Code, you can install following the recommended extensions that will help you with the development process: ESLint, Prettier, Vitest, Tailwind CSS IntelliSense, Version Lens, Error Lens, Pretty TypeScript Errors, Material Icon Theme.
To build all apps and packages, run the following command:
bun run buildTo develop all apps and packages (without requiring a local setup), run the following command:
bun devTo stop development apps and packages that are running on your local machine, run the following command:
bun stopTo start a local supabase instance (database), run the following command:
bun sb:startNote
This command will start a local supabase instance on your machine. You can access the Supabase Studio Dashboard by visiting http://localhost:8003
You can access the InBucket service that handles all email sending operations on your local machine by visiting http://localhost:8004
Warning
You need to have Docker installed and running on your machine to start a local supabase instance.
To stop the local supabase instance, run the following command:
bun sb:stopIn case you want to run all local development servers, run the following command:
bun devxRunning devx will:
- Stop the currently running supabase instance and save current data as backup (if there is any)
- Install all dependencies
- Start a new supabase instance (using backed up data)
- Start all Next.js apps in development mode
If you want to have the same procedure without the backup, you can run bun devrs instead. This will:
- Stop the currently running supabase instance (if there is any)
- Install all dependencies
- Start a new supabase instance (with clean data from seed.sql)
- Start all Next.js apps in development mode
In case you don't want to run a local supabase instance, you can run
bun devinstead.
There are 5 seed accounts that are already set up for local development:
To run all tests, run the following command:
bun run testNote: Tests are still a work in progress. We're currently working on adding tests to all packages to ensure the best quality possible.
We welcome contributions! Please read our CONTRIBUTING.md file for guidelines on how to submit pull requests, report issues, and suggest improvements. If there is any security vulnerability, please report it responsibly by following our security policy. For more detailed information, please refer to our Code of Conduct.
Common issues and their solutions:
- Supabase connection issues: Ensure Docker is running and you've correctly set the Supabase URLs and keys in your
.env.localfiles. - Build errors: Make sure you're using the correct Node.js version (v20+) and have run
bun ito install all dependencies.
To improve build and development performance:
- Use
bunfor faster package installation, better disk space usage, and significantly improved startup times (4x faster than Node.js). See Bun's design goals for more details. - Leverage Turborepo's caching capabilities by utilizing remote caching.
- Turborepo Handbook: Learn more about monorepo management with Turborepo.
- Next.js Documentation: In-depth guide for Next.js, the framework used in our apps.
- Next.js Learn: Interactive Next.js & React learning courses.
- Supabase Documentation: Learn about our database and backend services.
This project is licensed under the Apache License, Version 2.0. See the LICENSE file for more details.