Skip to content

Quickstart Development

This guide will help you set up a development environment for SocratesCode quickly.

Time to complete: 10 minutes

INFO

This guide assumes you have basic knowledge of Python and web development.

🎯 After completing this guide, you will have a working development environment for SocratesCode.

Prerequisites

  • Python 3.12 or later
  • Node.js 20 or later
  • Git
  • Google AI API key (for AI component)
  • Supabase account (for backend component)

Install Python dependencies

NOTE

You should install the following packages in global Python environment as this doesn't require initialization of a virtual environment.

It is required to install pipenv to manage Python dependencies.

bash
pip install --user pipenv

With --user flag, it will install the package in the user directory, which is recommended for global installations.

NOTE

On MacOS, you may need to install it via Homebrew:

bash
brew install pipenv

This will allow you to manage Python dependencies for the AI component of SocratesCode with Python virtual environment.

Clone the repository

bash
git clone

The project will have the following structure:

socratescode/
├── apps/
│   ├── frontend/
│   └── backend/
├── ai/
├── docs/
└── ...

Install npm dependencies

Navigate to the apps/frontend, apps/backend and run:

bash
npm install

For ai, run:

bash
pipenv install

This will install all the required dependencies for the frontend, backend, and AI components of SocratesCode.

Run the development server

NOTE

You will need to set up several environment variables for the backend and AI components to run properly.

For more information on how to set up environment variables, please refer to the Environment Variables section in the documentation.

After completing all of the above steps and properly setting up environment variables, you can run the development server for the frontend and backend.

To run the whole application, you can use the docker-compose command:

bash
npm run dev

This will start all part necessary for development, including the frontend, backend, and AI components.

To run each part separately, you can cd into each directory and run the following commands:

bash
npm run dev

For ai component, you can cd into the ai directory and run:

bash
pipenv run python app_team.py

What's next?