A comprehensive platform for managing energy communities and monitoring energy production/consumption.
- Python 3.10 or higher
- Node.js 18 or higher
- PostgreSQL 15 with PostGIS extension
- Docker and Docker Compose
.
├── backend/ # FastAPI backend
│ ├── alembic/ # Database migrations
│ ├── app/ # Application code
│ ├── docker-compose.yml # PostgreSQL setup
│ └── requirements.txt # Python dependencies
├── frontend/ # React frontend
│ ├── src/ # Source code
│ └── package.json # Node.js dependencies
└── run_local_dev.py # Development setup script
-
Clone the repository:
git clone https://github.com/yourusername/sentrics.git cd sentrics -
Start the PostgreSQL database:
cd backend docker-compose up -d -
Create and activate a Python virtual environment:
# Windows python -m venv backend/venv backend/venv/Scripts/activate # Linux/Mac python -m venv backend/venv source backend/venv/bin/activate
-
Install backend dependencies:
cd backend pip install -r requirements.txt -
Run database migrations:
alembic upgrade head
-
Install frontend dependencies:
cd frontend npm install -
Start development servers:
# Option 1: Run both servers with the development script python run_local_dev.py # Option 2: Run servers separately # Terminal 1 (Backend) cd backend python run_local.py # Terminal 2 (Frontend) cd frontend npm run dev
The application will be available at:
- Frontend: http://localhost:8080
- Backend API: http://localhost:8000
- API Documentation: http://localhost:8000/docs
Administrator account:
- Email: admin@sentrics.com
- Password: Admin123!
To create a new migration:
cd backend
alembic revision --autogenerate -m "description of changes"To apply migrations:
alembic upgrade headCreate a .env file in the backend directory:
DATABASE_URL=postgresql://postgres:postgres@localhost:5433/sentrics
SECRET_KEY=your-secret-key- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.