Go to file
Damir Mukimov ad749d9184
Some checks failed
Test / Unit Tests (push) Failing after 1m20s
Build / Build Binary (push) Failing after 2m32s
Docker Build / Build Docker Image (push) Failing after 2m37s
Test / Integration Tests (push) Successful in 4s
Lint / Go Lint (push) Failing after 18m28s
Add Gitea Actions workflows for CI/CD
2025-12-24 23:27:45 +01:00
.gitea/workflows Add Gitea Actions workflows for CI/CD 2025-12-24 23:27:45 +01:00
.github feat: Implement Bleve migration script and unify CLI (#26) (#64) 2025-11-30 21:54:18 +01:00
api This commit introduces a series of significant improvements to bring the codebase closer to a production-ready state. 2025-10-08 17:25:02 +00:00
cmd Security Hardening and GraphQL Caching (#69) 2025-12-01 00:14:22 +01:00
content/blog feat: Implement blog schema and example content 2025-09-07 23:22:36 +00:00
deploy I have refactored the background jobs by moving all related logic from the syncjob/, linguistics/, and internal/enrich directories into the new internal/jobs/sync and internal/jobs/linguistics packages. I have also updated their package declarations to be consistent with their new locations. 2025-09-02 15:02:04 +00:00
docs Update workflows and tasks documentation 2025-11-30 03:13:33 +01:00
internal Security Hardening and GraphQL Caching (#69) 2025-12-01 00:14:22 +01:00
ops I have refactored the background jobs by moving all related logic from the syncjob/, linguistics/, and internal/enrich directories into the new internal/jobs/sync and internal/jobs/linguistics packages. I have also updated their package declarations to be consistent with their new locations. 2025-09-02 15:02:04 +00:00
pkg/linguistics feat: Apply Jules AI changes - Search service implementation and refactoring 2025-11-30 03:15:35 +01:00
schemas feat: Implement blog schema and example content 2025-09-07 23:22:36 +00:00
test I have refactored the background jobs by moving all related logic from the syncjob/, linguistics/, and internal/enrich directories into the new internal/jobs/sync and internal/jobs/linguistics packages. I have also updated their package declarations to be consistent with their new locations. 2025-09-02 15:02:04 +00:00
.air.toml Initial commit: Tercul Go project with comprehensive architecture 2025-08-13 07:42:32 +02:00
.gitignore wip 2025-09-01 00:43:59 +02:00
.golangci.yml Security Hardening and GraphQL Caching (#69) 2025-12-01 00:14:22 +01:00
.tool-versions wip 2025-09-01 00:43:59 +02:00
AGENTS.md docs: consolidate tasks and clean up legacy files 2025-10-04 23:59:30 +00:00
api-binary Update GitHub Actions workflows to 2025 best practices (#29) 2025-11-27 07:08:08 +01:00
docker-compose.yml Initial commit: Tercul Go project with comprehensive architecture 2025-08-13 07:42:32 +02:00
Dockerfile feat: Implement Bleve migration script and unify CLI (#26) (#64) 2025-11-30 21:54:18 +01:00
Dockerfile.dev Initial commit: Tercul Go project with comprehensive architecture 2025-08-13 07:42:32 +02:00
go.mod Security Hardening and GraphQL Caching (#69) 2025-12-01 00:14:22 +01:00
go.sum feat: Implement Bleve migration script and unify CLI (#26) (#64) 2025-11-30 21:54:18 +01:00
gqlgen.yml feat: Refactor GORM relations and implement mutations 2025-09-06 12:45:44 +00:00
jules-task.md Update workflows and tasks documentation 2025-11-30 03:13:33 +01:00
Makefile Chore: Clean up lint warnings and improve code quality 2025-10-07 13:14:01 +00:00
PRODUCTION-TASKS.md feat: Implement Bleve migration script and unify CLI (#26) (#64) 2025-11-30 21:54:18 +01:00
README.md feat: Implement Bleve migration script and unify CLI (#26) (#64) 2025-11-30 21:54:18 +01:00
refactor.md This commit updates the TODO.md and refactor.md files to reflect the latest architectural changes. It also removes several temporary and one-off script files to clean up the repository. 2025-10-03 03:02:46 +00:00
SECURITY.md Create SECURITY.md for security policy 2025-11-30 04:00:18 +01:00
TASKS.md feat: Implement Bleve migration script and unify CLI (#26) (#64) 2025-11-30 21:54:18 +01:00
tools.go feat: Implement analytics features 2025-09-07 16:43:15 +00:00

The Tercul Project

Welcome to Tercul, a modern platform for literary enthusiasts to discover, translate, and discuss works from around the world. This repository contains the backend services, API, and data processing pipelines that power the platform.

Architecture

The Tercul backend is built using a Domain-Driven Design (DDD-lite) approach, emphasizing a clean separation of concerns between domain logic, application services, and infrastructure. Key architectural patterns include:

  • Command Query Responsibility Segregation (CQRS): Application logic is separated into Commands (for writing data) and Queries (for reading data). This allows for optimized, scalable, and maintainable services.
  • Clean Architecture: Dependencies flow inwards, with inner layers (domain) having no knowledge of outer layers (infrastructure).
  • Dependency Injection: Services and repositories are instantiated at the application's entry point (cmd/cli) and injected as dependencies, promoting loose coupling and testability.

For a more detailed explanation of the architectural vision and ongoing refactoring efforts, please see refactor.md.

Getting Started

Follow these instructions to get the development environment up and running on your local machine.

Prerequisites

  • Go: Version 1.25.0 (as specified in .tool-versions)
  • Docker & Docker Compose: For running external dependencies like PostgreSQL and Weaviate.
  • make: For running common development commands.
  • golangci-lint: For running the linter. Install it with:
    go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
    
    Ensure your Go binary path ($(go env GOPATH)/bin) is in your shell's PATH.

Installation

  1. Clone the repository:

    git clone <repository-url>
    cd tercul
    
  2. Install Go dependencies:

    go mod tidy
    

Configuration

The application is configured using environment variables. A local docker-compose.yml file is provided to run the necessary services (PostgreSQL, Weaviate, etc.) with default development settings.

The application will automatically connect to these services. For a full list of configurable variables and their default values, see internal/platform/config/config.go.

Running the Application

  1. Start external services:

    docker-compose up -d
    
  2. Run the API server:

    go run cmd/cli/main.go serve
    

    Or build and run:

    go build -o bin/tercul ./cmd/cli
    ./bin/tercul serve
    

    The API server will be available at http://localhost:8080. The GraphQL playground can be accessed at http://localhost:8080/playground.

Available Commands

The Tercul CLI provides several commands:

  • tercul serve - Start the GraphQL API server
  • tercul worker - Start background job workers
  • tercul enrich --type <type> --id <id> - Enrich entities with external data
  • tercul bleve-migrate --index <path> - Migrate translations to Bleve index

Run tercul --help for more information.

Running Tests

To ensure code quality and correctness, run the full suite of linters and tests:

make lint-test

This command executes the same checks that are run in our Continuous Integration (CI) pipeline.