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

AI Integration

FinCore serves AI-friendly skill files so your coding assistant can help you integrate with the API. These files are kept in the repo and updated with every API release.

For any AI assistant (llms.txt)

# Lightweight summary
curl https://fincore-engine.fly.dev/llms.txt

# Full API reference
curl https://fincore-engine.fly.dev/llms-full.txt

For Claude Code

# Download the skill file into your project
mkdir -p .claude/commands
curl -o .claude/commands/fincore.md https://fincore-engine.fly.dev/skill.md

# Then in Claude Code, type:
/fincore

Claude Code will load the full API reference into context and can help you write integration code, construct requests, debug responses, and more.

OpenAPI Spec

curl https://fincore-engine.fly.dev/swagger/index.yaml

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

 
 
 

Contributors

Languages