A comprehensive web application for Solar Power Plant inspection and Construction management using drones with the latest in AI/ML technology.
- Node.js 18+
- Python 3.9+
- Git
-
Clone the repository
git clone <your-repo-url> cd Automate-web-app-clean
-
Install dependencies
# Frontend dependencies npm install # Backend dependencies pip install -r requirements.txt
-
Set up environment variables
cp .env.example .env # Edit .env with your configuration -
Initialize the database
python init_database.py
-
Start the development servers
# Terminal 1: Start React frontend npm start # Terminal 2: Start Flask backend python flask_backend.py
- Database files (
.db) are NOT included in this repository - They contain sensitive user data and should not be version controlled
- Each environment (dev, staging, production) should have its own database
The application uses SQLAlchemy with the following options:
-
Development (SQLite)
export DATABASE_URL="sqlite:///automate_solar.db" python init_database.py
-
Production (PostgreSQL)
export DATABASE_URL="postgresql://user:password@localhost:5432/automate_solar" python init_database.py
-
Add sample data (optional)
export ADD_SAMPLE_DATA="true" python init_database.py
This application is configured for Vercel deployment:
- Connect your repository to Vercel
- Set environment variables in Vercel dashboard
- Deploy automatically on push to main branch
# Flask Configuration
SECRET_KEY=your_secret_key_here
FLASK_ENV=production
DATABASE_URL=your_database_connection_string
# AWS S3 Configuration
S3_KEY=your_s3_access_key
S3_SECRET=your_s3_secret_key
S3_REGION=us-east-1
S3_BUCKET=your_s3_bucket_name├── src/ # React frontend source code
├── public/ # Static assets
├── flask_backend.py # Flask API backend
├── init_database.py # Database initialization script
├── requirements.txt # Python dependencies
├── package.json # Node.js dependencies
├── vercel.json # Vercel deployment configuration
└── .gitignore # Git ignore rules
npm start- Start React development servernpm run build- Build React app for productionnpm test- Run testsnpm run lint- Run ESLintpython flask_backend.py- Start Flask development server
- Frontend: ESLint + Prettier
- Backend: Flake8
- Pre-commit hooks configured
POST /api/signup- User registrationPOST /api/login- User login
GET /api/projects- Get user's projectsPOST /api/projects/create-from-dxf- Create project from DXF fileGET /api/projects/<id>- Get project details
POST /api/s3/generate-presigned-post- Get S3 upload URL
- Fork the repository
- Create a feature branch
- Make your changes
- Run tests and linting
- Submit a pull request
[Add your license information here]
For support, please contact [your contact information]