neruvara
A clean, scalable women's health tracking application built with Flutter and FastAPI, following clean architecture principles and SOLID design patterns.
Neruvara - Women's Health Application
A comprehensive women's health application built with Flutter frontend and FastAPI backend, following clean architecture principles and professional development practices.
#๐ฑ Features
##Authentication System
- JWT-based authentication with refresh tokens
- Secure password hashing (bcrypt)
- Role-based access control
- Token blacklisting for security
##User Management
- User registration and login
- Profile management
- Account settings
##Health Tracking (Ready for Implementation)
- Menstrual cycle tracking
- Symptom logging
- Health insights
- Data visualization
#๐ ๏ธ Technology Stack
##Frontend
- Framework: Flutter 3.19+
- State Management: Riverpod
- Navigation: Go Router
- UI: Material Design 3
- Internationalization: JSON-based translation system
- Architecture: Clean Architecture with dependency injection
##Backend
- Framework: FastAPI
- Database: PostgreSQL 15+ with Alembic migrations
- Caching: Redis
- Authentication: JWT with bcrypt password hashing
- API Documentation: OpenAPI/Swagger
- Architecture: Clean Architecture with SOLID principles
##DevOps
- Containerization: Docker & Docker Compose
- CI/CD: GitHub Actions with comprehensive pipelines
- Code Quality: Black, isort, mypy, flake8, pytest
- Security: Bandit, Trivy, safety checks
- Performance: Locust load testing
- Deployment: Automated deployment workflows
#๐๏ธ Architecture
This project implements Clean Architecture with SOLID principles:
##Frontend (Flutter)
- Presentation Layer: UI components and state management (Riverpod)
- Domain Layer: Business logic and entities
- Data Layer: API clients and repositories
- Core Layer: Utilities, constants, and configuration
##Backend (FastAPI)
- API Layer: HTTP endpoints and middleware
- Domain Layer: Business entities and use cases
- Infrastructure Layer: Database, external services, and repositories
#๐ Quick Start
##Prerequisites
- Flutter 3.19.0+
- Python 3.11+
- Docker & Docker Compose
- PostgreSQL 15+ (if running locally)
- Redis 7+ (if running locally)
##Development Setup
-
Clone and setup environment:
# Setup backend cd neruvara-backend chmod +x setup_dev.sh ./setup_dev.sh # Setup frontend cd ../neruvara flutter pub get
-
Start services with Docker:
cd neruvara-backend docker-compose up -d
-
Run migrations:
cd neruvara-backend source venv/bin/activate alembic upgrade head
-
Start development servers:
# Backend (in neruvara-backend/) uvicorn app.main:app --reload --host 0.0.0.0 --port 8000 # Frontend (in neruvara/) flutter run
#๐ Project Structure
neruvara/
โโโ lib/
โ โโโ core/ # Core configuration & utilities
โ โโโ domain/ # Business logic & entities
โ โโโ data/ # Data sources & repositories
โ โโโ presentation/ # UI components & pages
โ โโโ main.dart # Application entry point
โโโ assets/
โ โโโ translations/ # JSON translation files
โโโ test/ # Flutter tests
neruvara-backend/
โโโ app/
โ โโโ api/ # API endpoints & routing
โ โโโ domain/ # Domain models & business logic
โ โโโ infrastructure/ # Database & external services
โ โโโ core/ # Configuration & utilities
โ โโโ main.py # FastAPI application
โโโ alembic/ # Database migrations
โโโ scripts/ # Utility scripts
#๏ฟฝ Development
##Code Quality
The project enforces strict code quality standards:
- Python: Black formatting, isort imports, mypy type checking, flake8 linting
- Flutter: Dart analyzer with strict rules
- Security: Automated security scanning with Bandit and Trivy
- Testing: Comprehensive unit and integration tests
##Available Scripts
# Backend development
cd neruvara-backend
./setup_dev.sh # Initial setup
source venv/bin/activate # Activate virtual environment
uvicorn app.main:app --reload # Start development server
alembic revision --autogenerate -m "description" # Create migration
alembic upgrade head # Apply migrations
pytest # Run tests
black . # Format code
mypy . # Type checking
# Frontend development
cd neruvara
flutter pub get # Install dependencies
flutter run # Start development
flutter test # Run tests
flutter build apk # Build Android
flutter build ios # Build iOS
flutter build web # Build web
#๏ฟฝ Environment Variables
##Backend (.env)
# Security
SECRET_KEY=your-super-secure-secret-key-at-least-32-characters
# Database
DATABASE_URL=postgresql://neruvara:neruvara@localhost:5432/neruvara
# Redis
REDIS_URL=redis://localhost:6379/0
# Optional
DEBUG=false
ENVIRONMENT=development
SENTRY_DSN=your-sentry-dsn
#๐ Deployment
The project includes comprehensive CI/CD pipelines:
- Backend Pipeline: Code quality โ Testing โ Security scanning โ Docker build โ Performance testing โ Deployment
- Frontend Pipeline: Analysis โ Testing โ Multi-platform builds โ Security scanning โ Deployment
- Orchestration: Coordinated deployments with E2E testing and security audits
#๐งช Testing
##Backend Testing
cd neruvara-backend
pytest tests/ -v --cov=app --cov-report=html
##Frontend Testing
cd neruvara
flutter test --coverage
##Performance Testing
cd neruvara-backend
locust -f locustfile.py --host=http://localhost:8000
#๏ฟฝ API Documentation
When running the backend, visit:
- Swagger UI: http://localhost:8000/docs
- ReDoc: http://localhost:8000/redoc
- OpenAPI JSON: http://localhost:8000/openapi.json
#๐ Internationalization
The frontend uses a JSON-based translation system:
// Usage in Flutter
Text(context.l10n.welcome)
Text(context.l10n.loginButton)
Translations are located in
neruvara/assets/translations/
:en.json
- Englishid.json
- Indonesian
#๐ก๏ธ Security
- JWT tokens with automatic refresh
- Password hashing with bcrypt
- CORS configuration
- Rate limiting
- Input validation and sanitization
- Security headers
- Automated security scanning in CI/CD
#๐ค Contributing
- Follow the established architecture patterns
- Maintain high code coverage (>90%)
- Use semantic commit messages
- Ensure all CI checks pass
- Follow code style guidelines
#๐ License
This project is proprietary software. All rights reserved.
#๐ฅ Team
Developed following clean architecture principles with focus on maintainability, scalability, and professional development practices.
Ready for production deployment with comprehensive testing, security, and monitoring infrastructure in place.
#๐ Support
For issues and questions:
- Check the troubleshooting section
- Review Docker logs
- Ensure all prerequisites are installed
- Verify environment configuration
Previous
No more posts
Next