Hello, contributor! We're thrilled to have you here. This guide will help you set up your development environment and run NutriZen on your local machine.
Before you begin, ensure you have the following tools installed:
- Node.js: Version 18.x or higher. This includes npm (version 7+). Download here
- Git: Essential for version control. Download here
Follow these steps to get the code ready to run.
First, Fork the repository to your own GitHub account.
Next, clone your fork to your local machine (remember to replace <YOUR-USERNAME> with your GitHub username):
git clone [https://github.com/](https://github.com/)<YOUR-USERNAME>/nutrizen.git
cd nutrizenNow, install all project dependencies using npm:
npm installFor the application to connect correctly to external services (like the database), you need to configure your environment variables.
NutriZen uses Supabase for its database and authentication. You will need to create a free project for local development.
- Create a free account at Supabase.
- Create a new project (e.g., "nutrizen-dev").
- After the project is created, go to Project Settings > API.
- There you will find your Project URL and your
anon (public)API key.
In the root of the web application (/apps/web), create a file named .env.local. This file should not be committed to GitHub.
Copy the contents of the example file (.env.example) into your new file and fill it with your Supabase keys:
# File: /apps/web/.env.local
# Supabase
NEXT_PUBLIC_SUPABASE_URL="YOUR_SUPABASE_PROJECT_URL_HERE"
NEXT_PUBLIC_SUPABASE_ANON_KEY="YOUR_SUPABASE_ANON_KEY_HERE"
# Other project environment variables will go here in the future...Important: You will also need to create the database tables in your Supabase project. We will provide the SQL script for this soon.
With everything set up, you are ready to run the development server.
From the root of the monorepo, execute the following command:
# To run the web application (Next.js)
npm run dev --workspace=webOpen your browser and navigate to http://localhost:3000. You should see the NutriZen application running!
If something didn't work as expected, please open an Issue and tell us what happened. We're here to help!
Thank you for contributing!