A full-stack application for managing solar panel cleaning services, consisting of a Flask backend API and a React Native mobile app.
solar-cleaning-mvp/
├── backend/ # Flask backend
│ ├── app.py # Main application file
│ ├── config.py # Configuration settings
│ ├── requirements.txt # Python dependencies
│ └── tests/ # Backend tests
├── mobile/ # React Native mobile app
│ ├── src/
│ │ ├── screens/ # App screens
│ │ ├── components/ # Reusable components
│ │ ├── services/ # API services
│ │ └── navigation/ # Navigation setup
│ ├── App.tsx # Root component
│ └── package.json # JavaScript dependencies
-
Create and activate virtual environment:
cd backend python -m venv venv source venv/bin/activate # or `venv\Scripts\activate` on Windows
-
Install dependencies:
pip install -r requirements.txt
-
Set up environment variables:
cp .env.example .env # Edit .env with your database credentials and other settings
-
Initialize database:
flask db upgrade
-
Run the development server:
flask run
-
Install dependencies:
cd mobile npm install
-
iOS setup:
cd ios pod install cd ..
-
Start the development server:
npm start
-
Run on iOS:
npm run ios
-
Run on Android:
npm run android
- User authentication
- Job management
- Photo capture and storage
- GPS location tracking
- Offline data synchronization
- Job completion workflow
- POST /api/auth/login - User login
- GET /api/jobs/today - Get today's jobs
- POST /api/jobs/{id}/complete - Mark job as complete
- POST /api/jobs/{id}/photos - Upload job photos
-
Login Screen
- Email/password authentication
- Secure token storage
-
Jobs Screen
- List of today's jobs
- Job status indicators
- Pull-to-refresh
-
Job Detail Screen
- Job information
- Photo capture
- Job completion
- GPS location tracking
-
Code Style
- Follow PEP 8 for Python code
- Use ESLint rules for JavaScript/TypeScript
- Include type hints and TypeScript types
-
Testing
- Write unit tests for core functionality
- Test offline capabilities
- Test error scenarios
-
Security
- Implement proper authentication
- Secure file uploads
- Validate all inputs
- Handle sensitive data properly
-
Performance
- Optimize database queries
- Implement proper caching
- Handle offline data efficiently
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.