Complete guide for developers contributing to the AutoBot Solutions Forum.
1. Clone Repository
bash
git clone https://github.com/AutoBotSolutions/repo-forum.git
cd repo-forum
2. Create Virtual Environment
bash
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
3. Install Dependencies
bash
pip install --upgrade pip
pip install -r requirements.txt
4. Configure Environment
bash
cp .env.example .env
Edit .env with your settings
5. Initialize Database
bash
python init_db.py
6. Run Development Server
bash
python run.py
Access at http://localhost:5000
repo-forum/
├── app/
│ ├── __init__.py # Application factory
│ ├── models.py # Database models
│ ├── template_filters.py # Custom Jinja2 filters
│ ├── static/ # Static assets
│ ├── templates/ # Jinja2 templates
│ ├── auth/ # Authentication module
│ ├── forum/ # Forum module
│ ├── admin/ # Admin module
│ ├── user/ # User module
│ ├── notification/ # Notification module
│ ├── message/ # Messaging module
│ ├── api/ # API module
│ └── main/ # Main routes
├── migrations/ # Database migrations
├── docs/ # Documentation
├── config.py # Configuration
├── run.py # Development server
├── init_db.py # Database initialization
└── requirements.txt # Python dependencies
main - Production codedevelop - Development branchfeature/* - Feature branchesbugfix/* - Bug fix branchesbash
git checkout develop
git pull origin develop
git checkout -b feature/your-feature-name
bash
git add .
git commit -m "feat: description of your feature"
feat: - New featurefix: - Bug fixdocs: - Documentationstyle: - Code stylerefactor: - Refactoringtest: - Testschore: - Maintenancebash
flask db migrate -m "description"
bash
flask db upgrade
bash
flask db downgrade
bash
pytest
models.py
2. Create migration
3. Apply migration
4. Add relationships
5. Create admin routes (if needed)
6. Update templatesforms.py
2. Add validators
3. Add CSRF protection
4. Create template with form
5. Handle form submission
6. Add flash messages__init__.py
3. Create routes.py
4. Create forms.py (if needed)
5. Register blueprint in app/__init__.py
6. Create templates directorypython
app.run(debug=True)
bash
tail -f logs/app.log
python
from flask_sqlalchemy import get_debug_queries
for query in get_debug_queries():
print(query.statement, query.parameters, query.duration)
Import Errors
Database Errors
Template Errors