Skip to content

Bendomey/fincore-engine

Repository files navigation

Fincore Engine

Description

Fincore Engine is a modular accounting and journal management service designed to provide core financial operations for applications. It supports multi-client account management, journal entries, and transactional integrity, making it suitable for fintech, ERP, and bookkeeping solutions.

Resource Dependencies

  • PostgreSQL: Primary database for all persistent storage.
  • GORM: ORM for Go, used for database operations and migrations.
  • Go-Chi: HTTP router for building RESTful APIs.
  • Sentry: Error tracking and monitoring.
  • Validator: Input validation for API requests.
  • Reflex: Hot-reload utility for development.

Environment Setup

  1. Clone the repository:
    git clone https://github.com/Bendomey/fincore-engine.git
    cd fincore-engine
  2. Install Go (>=1.23.0) and PostgreSQL.
  3. Configure environment variables:
    • Copy or edit .envrc with your database and environment settings:
      cp .envrc.example .envrc  # if example exists, else edit .envrc directly
    • Example variables:
      export GO_ENV=development
      export PORT=5003
      export DB_HOST=localhost
      export DB_PORT=5432
      export DB_USER=your_db_user
      export DB_PASS=your_db_password
      export DB_NAME=fincore_dev
      export DB_SSLMODE=disable
      export DB_DEFAULT_DBNAME=postgres
      export SENTRY_DSN=
      export SENTRY_ENVIRONMENT=development
  4. Install Go dependencies:
    go mod download

Database Preparation (Migration)

To initialize or update the database schema, run:

  • Initial migration (drops and recreates DB):
    make setup-db
    # or
    go run init/main.go init/setup.go -init true
  • Update migration (applies new migrations):
    make update-db
    # or
    go run init/main.go init/setup.go -init false

Running the Service Locally

  • Development mode (with hot reload):
    make run-dev
    # or
    ./scripts/run-dev.sh
  • Production mode:
    make run
    # or
    ./scripts/run.sh

Features

  • Multi-client support (tenancy)
  • Account management (create, update, delete, list)
  • Journal entry management (create, post, update, delete, list)
  • Journal entry line management
  • Input validation and error handling
  • RESTful API design with Go-Chi
  • Database migrations and schema management
  • Sentry integration for error monitoring
  • Environment-based configuration

For more details, see the code in internal/handlers, internal/services, and internal/models.

About

Core accounting setup

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published