This is a demo project of Deliveroo app.
This Turborepo includes the following packages/apps:
server
: a ExpressJS appweb
: a ReactJS app
Each package/app is 100% TypeScript.
This Turborepo has some additional tools already setup for you:
- TypeScript for static type checking
- ESLint for code linting
- Prettier for code formatting
Run the following command:
pnpm install
// This will install all dependencies for all apps and packages
To run this project successfully, you need to set up the following environment variables. These variables contain sensitive information such as secret keys and database credentials, so ensure that you keep them confidential.
-
Create an
.env
file in the root directory of the project. (Use .env.example as a template) -
Copy and paste the following environment variables into the
.env
file:
# server/.env
ACCESS_TOKEN_SECRET=<ACCESS_TOKEN_SECRET>
REFRESH_TOKEN_SECRET=<REFRESH_TOKEN_SECRET>
CLIENT_URL=http://localhost:3000
GOOGLE_CLIENT_ID=<GOOGLE_CLIENT_ID>
GOOGLE_CLIENT_SECRET=<GOOGLE_CLIENT_SECRET>
DATABASE_NAME=<DATABASE_NAME>
DATABASE_USERNAME=<DATABASE_USERNAME>
DATABASE_PASSWORD=<DATABASE_PASSWORD>
# web/.env
VITE_GOOGLE_OAUTH_REDIRECT_URL=http://localhost:4000/auth/google
VITE_GOOGLE_CLIENT_ID=<YOUR GOOGLE CLIENT ID GOES HERE>
-
Replace the
<...>
placeholder values with the actual values specific to your setup. For example,<ACCESS_TOKEN_SECRET>
should be replaced with a secret key for your access tokens,<GOOGLE_CLIENT_ID>
and<GOOGLE_CLIENT_SECRET>
should be replaced with the corresponding values from your Google API credentials, and so on. -
Save the
.env
file.
Note: Make sure not to commit and push the .env
file to the repository, as it contains sensitive information. The file is already added to the .gitignore
to prevent accidental commits.
If you encounter any issues or have any questions, please don't hesitate to reach out for assistance.
To build all apps and packages, run the following command:
// In the root directory
pnpm build
To develop all apps and packages, run the following command:
// In the root directory
pnpm dev
// This will start both the server and the web app