• Home

  • Projects

  • Home
  • Projects
Listyo Adi Pamungkas - 2025 - All rights reserved
SitemapRSS Feed

    neruvara

    neruvara

    A clean, scalable women's health tracking application built with Flutter and FastAPI, following clean architecture principles and SOLID design patterns.
    Created at 9/13/2025 โ€ข 5 min read
    Repository
    Tags: Share:

    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

    1. Clone and setup environment:
      # Setup backend
      cd neruvara-backend
      chmod +x setup_dev.sh
      ./setup_dev.sh
      
      # Setup frontend
      cd ../neruvara
      flutter pub get
      
    2. Start services with Docker:
      cd neruvara-backend
      docker-compose up -d
      
    3. Run migrations:
      cd neruvara-backend
      source venv/bin/activate
      alembic upgrade head
      
    4. 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 - English
    • id.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

    1. Follow the established architecture patterns
    2. Maintain high code coverage (>90%)
    3. Use semantic commit messages
    4. Ensure all CI checks pass
    5. 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:
    1. Check the troubleshooting section
    2. Review Docker logs
    3. Ensure all prerequisites are installed
    4. Verify environment configuration
    Previous

    No more posts

    Next

    neruvara-backend