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.
pip install --user pipenvWith --user flag, it will install the package in the user directory, which is recommended for global installations.
This will allow you to manage Python dependencies for the AI component of SocratesCode with Python virtual environment.
Clone the repository
git cloneThe project will have the following structure:
socratescode/
├── apps/
│ ├── frontend/
│ └── backend/
├── ai/
├── docs/
└── ...Install npm dependencies
Navigate to the apps/frontend, apps/backend and run:
npm installFor ai, run:
pipenv installThis 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:
npm run devThis 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:
npm run devFor ai component, you can cd into the ai directory and run:
pipenv run python app_team.pyWhat's next?
- Configure the environment variables for the backend and AI components.
- Setup the Langfuse for monitoring the performance of the model.