Skip to content

prayaspoudel/evero

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

10 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Evero Platform

Enterprise-grade modular platform for building scalable applications across healthcare, insurance, finance, and banking sectors. Built with clean architecture principles and Go, Evero provides a robust foundation for domain-specific services with shared infrastructure components.

πŸ—οΈ Architecture

Evero follows a modular monolith architecture with clear separation of concerns:

  • Multi-Domain Support: Access (SSO), Healthcare, Insurance, Finance, and Banking modules
  • Clean Architecture: Domain-driven design with layers (Entity, Use Case, Repository, Controller)
  • Shared Infrastructure: Reusable components across all modules
  • Event-Driven: Kafka integration for asynchronous messaging
  • API-First: RESTful APIs with comprehensive validation
  • Modular Deployment: Each module can be deployed independently

πŸš€ Features

Core Infrastructure

  • Configuration Management: Environment-specific configurations (local, development, staging, production)
  • Database Support: PostgreSQL with GORM ORM
  • Caching: Redis integration for high-performance caching
  • Message Broker: Kafka and RabbitMQ support
  • Logging: Structured logging with Logrus and Zap
  • Validation: Request validation with go-playground/validator
  • Routing: Fiber v2 (primary framework)

Access Module (Authentication & Authorization)

Enterprise-grade single sign-on and access control system.

Features

  • Authentication

    • User registration and login
    • JWT-based access and refresh tokens
    • Token rotation and refresh
    • Session management with device tracking
    • Email verification workflow
  • Authorization

    • Multi-company/tenant support
    • OAuth 2.0 authorization code flow
    • Two-factor authentication (TOTP)
    • Role-based access control (RBAC)
    • Fine-grained permissions
  • Security

    • Password reset and verification
    • Account lockout protection
    • Audit logging
    • bcrypt password hashing
    • Secure token management

πŸ“– Documentation: docs/access/IMPLEMENTATION_SUMMARY.md
Migration Guide: docs/SSO_MIGRATION_SUMMARY.md
Quick Start: docs/access/QUICK_REFERENCE.md

Build & Deploy:

make build-access    # Build the module
make deploy-access   # Deploy the module

API: http://localhost:3000 (configurable)

Healthcare Module

Comprehensive healthcare management system for patient care, appointments, and medical records.

Features

  • Patient Management

    • Patient registration and demographics
    • Medical history tracking
    • Insurance information
    • Emergency contacts
  • Appointments & Scheduling

    • Appointment booking
    • Provider availability
    • Appointment reminders
    • Waitlist management
  • Electronic Medical Records (EMR)

    • Clinical notes
    • Diagnosis recording (ICD-10)
    • Prescription management
    • Lab results integration
  • Billing Integration

    • Insurance claim generation
    • Payment processing
    • Finance module integration

πŸ“– Documentation: docs/healthcare/README.md

Build & Deploy:

make build-healthcare    # Build the module
make deploy-healthcare   # Deploy the module

API: http://localhost:3001 (configurable)

Insurance Module

Complete insurance management platform for policies, claims, and underwriting.

Features

  • Policy Management

    • Policy creation and issuance
    • Premium calculation
    • Renewals and endorsements
    • Coverage management
  • Claims Processing

    • Claim submission and intake
    • Assessment and adjudication
    • Payment processing
    • Fraud detection
  • Underwriting

    • Risk assessment
    • Quote generation
    • Automated underwriting rules
    • Manual workflow support
  • Agent & Commission Management

    • Agent registration
    • Commission calculation
    • Performance analytics

πŸ“– Documentation: docs/insurance/README.md

Build & Deploy:

make build-insurance    # Build the module
make deploy-insurance   # Deploy the module

API: http://localhost:3002 (configurable)

Finance Module

Comprehensive financial management system with general ledger, AR/AP, and budgeting.

Features

  • General Ledger

    • Chart of accounts
    • Double-entry bookkeeping
    • Journal entries
    • Period closing
    • Multi-currency support
  • Accounts Receivable/Payable

    • Customer invoicing
    • Payment tracking
    • Aging reports
    • Vendor management
  • Budgeting & Forecasting

    • Budget creation
    • Variance analysis
    • Cash flow forecasting
  • Financial Reporting

    • Balance sheet
    • Income statement
    • Cash flow statement
    • Custom reports

πŸ“– Documentation: docs/finance/README.md

Build & Deploy:

make build-finance    # Build the module
make deploy-finance   # Deploy the module

API: http://localhost:3003 (configurable)

Banking Module

Core banking platform for account management, transactions, and lending (in planning).

πŸ“– Documentation: docs/banking/README.md
Status: πŸ“‹ Planning Phase

πŸ“ Project Structure

evero/
β”œβ”€β”€ Makefile                      # Root orchestration for all modules
β”œβ”€β”€ bin/                          # Compiled binaries (gitignored)
β”‚   β”œβ”€β”€ access
β”‚   β”œβ”€β”€ healthcare
β”‚   β”œβ”€β”€ insurance
β”‚   └── finance
β”‚
β”œβ”€β”€ app/                          # Application entry points
β”‚   β”œβ”€β”€ healthcare/               # Healthcare application
β”‚   β”œβ”€β”€ insurance/                # Insurance application
β”‚   └── finance/                  # Finance application
β”‚
β”œβ”€β”€ modules/                      # Domain modules
β”‚   β”œβ”€β”€ access/                   # Authentication & Authorization module
β”‚   β”‚   β”œβ”€β”€ cmd/server/           # Entry point
β”‚   β”‚   β”œβ”€β”€ entities/             # Domain entities
β”‚   β”‚   β”œβ”€β”€ models/               # Request/Response models
β”‚   β”‚   β”œβ”€β”€ repositories/         # Data access layer
β”‚   β”‚   β”œβ”€β”€ usecases/             # Business logic
β”‚   β”‚   β”œβ”€β”€ controllers/          # HTTP handlers
β”‚   β”‚   └── route.go              # Route definitions
β”‚   └── healthcare/               # Healthcare domain module
β”‚       β”œβ”€β”€ delivery/             # HTTP handlers/controllers
β”‚       β”œβ”€β”€ entity/               # Domain entities
β”‚       β”œβ”€β”€ features/             # Business logic (use cases)
β”‚       β”œβ”€β”€ gateway/              # External integrations
β”‚       β”œβ”€β”€ model/                # Request/Response models
β”‚       β”œβ”€β”€ repository/           # Data access layer
β”‚       └── test/                 # Unit and integration tests
β”‚
β”œβ”€β”€ infrastructure/               # Shared infrastructure components
β”‚   β”œβ”€β”€ cache/                    # Cache management (Redis, In-memory)
β”‚   β”œβ”€β”€ config/                   # Configuration management
β”‚   β”œβ”€β”€ database/                 # Database connections
β”‚   β”œβ”€β”€ logger/                   # Logging utilities
β”‚   β”œβ”€β”€ message-broker/           # Kafka/RabbitMQ integration
β”‚   β”œβ”€β”€ router/                   # HTTP routers (Fiber, Gin, Mux)
β”‚   β”œβ”€β”€ setup/                    # Infrastructure bootstrapping
β”‚   └── validator/                # Request validation
β”‚
β”œβ”€β”€ config/                       # Configuration files
β”‚   β”œβ”€β”€ access/                   # Access module configs
β”‚   β”‚   β”œβ”€β”€ local.json
β”‚   β”‚   β”œβ”€β”€ development.json
β”‚   β”‚   β”œβ”€β”€ stage.json
β”‚   β”‚   └── production.json
β”‚   β”œβ”€β”€ healthcare/               # Healthcare configs
β”‚   β”œβ”€β”€ insurance/                # Insurance configs
β”‚   └── finance/                  # Finance configs
β”‚
β”œβ”€β”€ database/                     # Database migrations and seeds
β”‚   β”œβ”€β”€ access/migrations/        # SSO database schemas
β”‚   β”œβ”€β”€ healthcare/migrations/    # Healthcare schemas
β”‚   β”œβ”€β”€ insurance/migrations/     # Insurance schemas
β”‚   └── finance/migrations/       # Finance schemas (10 tables)
β”‚
β”œβ”€β”€ deployment/                   # Deployment configurations
β”‚   β”œβ”€β”€ access/                   # Access module deployment
β”‚   β”‚   β”œβ”€β”€ Makefile              # Deployment tasks
β”‚   β”‚   β”œβ”€β”€ setup.sh              # Setup script
β”‚   β”‚   β”œβ”€β”€ Dockerfile
β”‚   β”‚   └── docker-compose.yml
β”‚   β”œβ”€β”€ healthcare/               # Healthcare deployment
β”‚   β”œβ”€β”€ insurance/                # Insurance deployment
β”‚   └── finance/                  # Finance deployment
β”‚
β”œβ”€β”€ packages/                     # External service integrations
β”‚   β”œβ”€β”€ lib/                      # Shared libraries
β”‚   β”œβ”€β”€ sendgrid/                 # Email service
β”‚   └── twilio/                   # SMS service
β”‚
└── docs/                         # Documentation
    β”œβ”€β”€ evero/                    # Platform technical docs
    β”œβ”€β”€ access/                   # Access module documentation
    β”œβ”€β”€ healthcare/               # Healthcare module documentation
    β”œβ”€β”€ insurance/                # Insurance module documentation
    β”œβ”€β”€ finance/                  # Finance module documentation
    └── banking/                  # Banking module documentation

πŸ› οΈ Technology Stack

Core

  • Go: 1.24.4
  • Web Framework: Fiber v2 (primary), Gin, Gorilla Mux
  • ORM: GORM v1.30.3
  • Database: PostgreSQL (primary), MySQL support via drivers
  • Validation: go-playground/validator v10

Infrastructure

  • Cache: Redis (go-redis v9)
  • Message Broker: Apache Kafka (Sarama v1.46), RabbitMQ
  • Logging: Logrus v1.9.3, Zap v1.27.0
  • Configuration: Viper v1.20.1
  • Database Drivers:
    • PostgreSQL: lib/pq v1.10.9
    • MySQL: gorm.io/driver/mysql v1.6.0
  • Security: bcrypt (golang.org/x/crypto v0.41.0)
  • UUID: google/uuid v1.6.0

🚦 Getting Started

Prerequisites

  • Go: 1.24.4 or higher
  • PostgreSQL: 14 or higher
  • Redis: 6 or higher (optional, for caching)
  • Kafka: 2.8 or higher (optional, for event streaming)
  • Make: For using the Makefile commands

Quick Start

  1. Clone the repository

    git clone https://github.com/prayaspoudel/evero.git
    cd evero
  2. View available commands

    make help
  3. Setup a module (e.g., healthcare)

    make setup-healthcare
  4. Build a module

    make build-healthcare
  5. Run migrations

    make migrate-healthcare
  6. Deploy a module

    make deploy-healthcare

Module-Specific Setup

Each module can be set up and deployed independently:

Access Module (SSO):

make setup-access      # Setup access module
make build-access      # Build binary
make deploy-access     # Deploy with migrations

Healthcare Module:

make setup-healthcare
make build-healthcare
make deploy-healthcare

Finance Module:

make setup-finance
make build-finance
make deploy-finance

All Modules:

make setup-all         # Setup all modules
make build-all         # Build all modules
make deploy-all        # Deploy all modules

Check Module Status

make status

Output:

πŸ“Š Module Status
================================
Access:      βœ… Built
Healthcare:  βœ… Built
Insurance:   ❌ Not built
Finance:     βœ… Built
================================

πŸ“ Configuration

Evero uses environment-specific JSON configuration files. Each module has its own configuration directory:

config/
β”œβ”€β”€ access/
β”‚   β”œβ”€β”€ local.json          # Local development
β”‚   β”œβ”€β”€ development.json    # Development environment
β”‚   β”œβ”€β”€ stage.json          # Staging environment
β”‚   └── production.json     # Production environment
β”œβ”€β”€ healthcare/
β”œβ”€β”€ insurance/
└── finance/

Configuration Structure

Each module follows a consistent configuration structure:

{
  "app": {
    "name": "Evero Healthcare API",
    "version": "1.0.0"
  },
  "web": {
    "port": 3000,
    "prefork": false,
    "cors_enabled": true
  },
  "database": {
    "host": "localhost",
    "port": 5432,
    "username": "postgres",
    "password": "postgres",
    "name": "evero_db",
    "sslmode": "disable",
    "pool": {
      "idle": 10,
      "max": 100,
      "lifetime": 300
    }
  },
  "kafka": {
    "bootstrap.servers": "localhost:9092",
    "producer.enabled": false,
    "group.id": "evero-service"
  },
  "redis": {
    "host": "localhost",
    "port": 6379,
    "password": "",
    "db": 0
  },
  "log": {
    "level": "info",
    "format": "json"
  }
}

Environment Selection

Set the environment using:

export EVERO_ENV=production  # Options: local, development, stage, production

Or specify when running:

./bin/access --config=config/access/production.json

πŸ§ͺ Testing

Running Tests

# Run all tests
go test ./...

# Test specific module
make test-access
make test-healthcare
make test-finance

# All module tests
make test-all

# Run with coverage
go test -cover ./...

Module Status

Check which modules are built:

make status

πŸ›οΈ Infrastructure Components

Configuration Manager

Centralized configuration loading with support for:

  • Environment-specific files
  • Module-specific overrides
  • Type-safe access methods
  • Hot-reload capability

See infrastructure/config/example_usage.md

Cache Manager

Multi-backend caching support:

  • Redis
  • In-memory cache
  • Factory pattern for easy switching

Database Manager

Database connection management:

  • PostgreSQL support with GORM
  • Connection pooling
  • Migration support
  • Multi-database support

Message Broker

Event-driven messaging:

  • Kafka producer/consumer
  • RabbitMQ support
  • Async event publishing

Router

HTTP routing with multiple framework support:

  • Fiber v2 (primary)
  • Gin
  • Gorilla Mux

Logger

Structured logging:

  • Logrus
  • Zap
  • Configurable log levels
  • JSON formatting

See infrastructure/ for detailed documentation.

πŸ”’ Security

  • Authentication: JWT-based token authentication
  • Password Security: bcrypt hashing
  • Input Validation: Comprehensive request validation
  • SQL Injection: Protected via ORM parameterized queries
  • Authorization: User-specific data isolation

πŸš€ Deployment

Docker Support

Each module can be deployed independently using Docker:

# Build Docker image
make docker-build-access

# Start containers
make docker-up-access

# Stop containers
make docker-down-access

Deployment Files

Each module has its own deployment configuration:

deployment/
β”œβ”€β”€ access/
β”‚   β”œβ”€β”€ Makefile              # Deployment commands
β”‚   β”œβ”€β”€ setup.sh              # Setup script
β”‚   β”œβ”€β”€ Dockerfile            # Docker image
β”‚   └── docker-compose.yml    # Orchestration
β”œβ”€β”€ healthcare/
β”œβ”€β”€ insurance/
└── finance/

Environment Configuration

Set the environment variable:

export EVERO_ENV=production

Configuration files are loaded based on this variable:

  • local β†’ config/[module]/local.json
  • development β†’ config/[module]/development.json
  • stage β†’ config/[module]/stage.json
  • production β†’ config/[module]/production.json

Production Deployment

  1. Build the module:

    make build-access
  2. Run migrations:

    make migrate-access
  3. Start the service:

    ./bin/access --config=config/access/production.json

Or use the combined deploy command:

make deploy-access  # Builds + migrates

πŸ“š API Documentation

Response Format

All API responses follow a consistent format:

Success Response:

{
  "code": 200,
  "status": "success",
  "data": { ... }
}

Error Response:

{
  "code": 400,
  "status": "error",
  "message": "Validation failed",
  "errors": ["field: first_name is required"]
}

Pagination

List endpoints support pagination:

GET /api/v1/[resource]?page=1&size=10

Response includes metadata:

{
  "data": [...],
  "pagination": {
    "page": 1,
    "size": 10,
    "total_items": 50,
    "total_pages": 5
  }
}

Module-Specific APIs

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Code Style

  • Follow Go standard formatting (gofmt)
  • Write meaningful commit messages
  • Add tests for new features
  • Update documentation as needed
  • Use the Makefile for common tasks

Development Workflow

  1. Create a new module or feature
  2. Write tests first (TDD approach)
  3. Implement the feature
  4. Run tests: make test-[module]
  5. Format code: make fmt
  6. Run linter: make lint
  7. Update documentation
  8. Submit PR

πŸ“– Documentation

Module Documentation

Platform Documentation

Quick References

πŸ“„ License

This project is private and proprietary.

πŸ‘₯ Authors

πŸ™ Acknowledgments

  • Built with Go and the amazing Go ecosystem
  • Inspired by clean architecture principles
  • Designed for scalability and maintainability

πŸ“ž Support

For questions or issues, please contact the development team or open an issue in the repository.


Note: This is a private repository. Please ensure you have proper authorization before accessing or using this codebase.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published