Welcome to the Bot Verse development guide! This document outlines how to set up the project for local development, the core components involved, and how to contribute effectively.
- Getting Started
- Project Structure
- Development Workflow
- Running the Project
- Testing
- Contributing
- Code Style and Guidelines
- Debugging Tips
To contribute to the Bot Verse project, follow these steps to get the environment set up locally.
- Python 3.8+
- Flask for the backend
- React with Vite for the client
- Tailwind CSS for styling
Install the required dependencies by running:
pip install -r requirements.txt
To manage client dependencies and build tools:
cd client && bun install
Bot-Verse/
├── . # Flask-based API and chatbot management
├── client/ # React (Vite) based client
├── migrations/ # Database migrations
├── tests/ # Unit and integration tests
├── .env # Environment variables
├── requirements.txt # Python dependencies
└── README.md # Project readme
python -m venv .venv
-
On Windows:
source .venv/Scripts/activate
-
On macOS/Linux:
source .venv/bin/activate
pip install -r requirements.txt
flask db init
flask db migrate -m "Initial migration"
flask db upgrade
python run.py
The application will be available at http://127.0.0.1:5000
.
In the client
directory, start the React development server:
bun dev
This will launch the frontend on http://localhost:3000
.
If you make changes to the database schema, ensure to handle migrations with:
flask db migrate -m "Describe migration"
flask db upgrade
Install tesseract
for OCR
sudo apt install tesseract-ocr
- Backend (root):
python run.py
- Client:
bun dev
- Database Migrations:
flask db upgrade
To run tests, use the following command:
pytest
Ensure all new features have accompanying tests.
Please read our CONTRIBUTING.md and follow the guidelines. Contributions are welcome and appreciated!
- Python: Follow PEP8 guidelines for the backend.
- TypeScript/React: Use ESLint and Prettier for code formatting.
Make sure your code is clean, documented, and tested before submitting a pull request.
- Use Flask's
debug=True
mode for easier debugging on the backend. - React error boundaries and Chrome DevTools can help troubleshoot frontend issues.
Happy coding! 🎉