Local Development Setup

Last updated 1 min read
Report issue

Local Development Environment Setup#

This guide provides a step-by-step process for setting up a local development environment for the GritivaCore project. It is tailored for developers who have just cloned the repository and want to run the backend, agent, and frontend on their laptops within 30 minutes.

Before you begin, ensure you have the following software and tools installed:

  • Python 3.12 (use pyenv for installation)
  • Node 20+ (use nvm for installation)
  • Docker Desktop (for Postgres and Redis)
  • make
  • git

Run the following commands to clone the repository:

BASH
git clone https://github.com/mohammad2000/GritivaCore.git
cd GritivaCore

To set up the backend, execute the following commands:

BASH
cd app && python3.12 -m venv venv && source venv/bin/activate
pip install -r requirements.txt
docker compose -f compose.dev.yml up -d postgres redis
alembic upgrade head
uvicorn app.main:app --reload --port 8003

To set up the frontend, run:

BASH
cd server-panel && npm install && npm run dev

Then visit http://localhost:5173 in your browser.

If you're working on the agent code, set it up by running:

BASH
cd agentNew && python -m main

This will register against the local backend at port 8003.

To set up the documentation system, execute:

BASH
cd gritiva-docs-backend && uvicorn app.main:app --port 8005
cd gritiva-docs-frontend && npm run dev
  • Postgres port conflict (default is 5432).
  • Python 3.13 is not yet supported; please use 3.12.
  • wg-quick is required for mesh tests.

To run the test suite, execute:

BASH
make backend-test

Following these steps will help you set up the GritivaCore local development environment efficiently. If you have any questions or run into issues, refer to the troubleshooting section or seek help from the community.

Troubleshooting

Troubleshooting
If you encounter issues during setup, consider the following common troubleshooting tips: - Ensure all prerequisites are installed correctly. - Check for any port conflicts. - Verify that Docker is running properly.