Modern document management platform connecting physical equipment to digital docs via QR codes. Version control, team collaboration, and field-ready access for technical documentation. https://docport.io
  • JavaScript 93.7%
  • Go 6.2%
Find a file
Jonas Claes fcc6d36ea8
All checks were successful
Build / build (push) Successful in 2m15s
feat: add build and release workflows for CI/CD pipeline
2026-06-14 12:49:27 +02:00
.forgejo/workflows feat: add build and release workflows for CI/CD pipeline 2026-06-14 12:49:27 +02:00
cmd/app feat(server): add SlogRequestLogger middleware for structured request logging 2026-05-24 21:26:59 +02:00
deployment feat(deployment): integrate Keycloak with PostgreSQL and configure DocPort realm 2026-04-05 21:42:54 +02:00
e2e chore(deps): migrate app imports to github.com/DocPort-io/app throughout the codebase 2026-05-24 13:10:05 +02:00
internal chore: update dependencies 2026-06-07 10:48:17 +02:00
pkg/openapi chore: update dependencies 2026-06-07 10:48:17 +02:00
scripts/docker ci: add comments for valid UID/GID cases in entrypoint script 2025-12-22 20:32:00 +01:00
.gitignore fix(testutil): correct table name typo in CleanDB function 2026-05-24 19:15:55 +02:00
.goreleaser.yaml fix: update Forgejo API and server URLs in GoReleaser configuration 2026-06-14 01:01:11 +02:00
CODE_OF_CONDUCT.md feat: add foundational project documentation and policies 2025-12-17 14:54:42 +01:00
config.example.toml chore: major improvements and rewrite 2026-05-24 12:17:04 +02:00
CONTRIBUTING.md fix(docs): correct checklist item in CONTRIBUTING.md 2025-12-22 18:38:01 +01:00
docker-compose.yml chore(docker): add build context for backend service in docker-compose.yml 2026-04-05 21:43:58 +02:00
Dockerfile chore: major improvements and rewrite 2026-05-24 12:17:04 +02:00
go.mod chore(deps): bump filippo.io/edwards25519 to v1.1.1 2026-06-07 10:50:38 +02:00
go.sum chore(deps): bump filippo.io/edwards25519 to v1.1.1 2026-06-07 10:50:38 +02:00
LICENSE feat: add foundational project documentation and policies 2025-12-17 14:54:42 +01:00
qodana.yaml ci(qodana): add Qodana configuration file for static code analysis 2026-03-10 21:09:00 +01:00
README.md feat: add foundational project documentation and policies 2025-12-17 14:54:42 +01:00
sonar-project.properties chore: major improvements and rewrite 2026-05-24 12:17:04 +02:00

DocPort.io — Modern Document Management for the Field

Overview

DocPort.io is a modern document management platform that connects physical equipment to digital documentation using QR codes. It delivers version control, team collaboration, and fieldready access to technical docs — even for large files — through a simple service.

Key Features

  • QRcode anchored access to documentation for assets in the field
  • Versioned documents with attach/detach to versions and projects
  • File storage abstraction with local filesystem provider
  • REST API with OpenAPI/Swagger docs available at /swagger
  • Builtin pagination middleware for list endpoints
  • Zerodowntime schema migrations on startup
  • Configuration via file and environment variables

Project Status

Early stage. API and storage are functional; expect breaking changes before v1.0.

Architecture at a Glance

  • Language: Go
  • HTTP: chi router with middleware (request ID, logging, recover)
  • Config: Viper (TOML + env)
  • DB: SQLite (modernc.org/sqlite) by default
  • Migrations: golangmigrate with embedded SQL in the binary
  • SQL: generated via sqlc (see sqlc.yaml and pkg/database)
  • Storage: pluggable providers (filesystem included)

Repository Layout

  • cmd/app: application entrypoint
  • pkg/app: server/bootstrap (routes, server, database, storage)
  • pkg/controller: HTTP handlers
  • pkg/service: business logic
  • pkg/database: sqlc generated code and helpers
  • migrations: SQL migrations (embedded into the binary)
  • pkg/docs: Swagger/OpenAPI spec and generated bindings
  • pkg/storage: storage provider interfaces/impls
  • pkg/dto: request/response DTOs

Quick Start

Prerequisites

  • Go 1.21+ (module mode)
  1. Clone and enter
git clone https://github.com/docport-io/app.git
cd app
  1. Configure

Copy the example config and adjust as needed:

cp config.example.toml config.toml

Important settings in config.toml:

  • server.bind: interface to bind (e.g., 0.0.0.0)
  • server.port: port (e.g., 8080)
  • server.host: advertised host for Swagger (e.g., localhost:8080)
  • database.driver: sqlite
  • database.url: file:./test.db?cache=shared
  • storage.provider: filesystem

Environment variables

All config keys can be overridden via environment variables with prefix DOCPORT_ and dots replaced by underscores. Examples:

DOCPORT_SERVER.BIND=0.0.0.0     → DOCPORT_SERVER_BIND
DOCPORT_SERVER.PORT=8080        → DOCPORT_SERVER_PORT
DOCPORT_STORAGE.PROVIDER=...    → DOCPORT_STORAGE_PROVIDER

Run

go run ./cmd/app

On first start, migrations run automatically and create/update the schema.

Build a binary

go build -o docport ./cmd/app
./docport

Storage Providers

Current provider: filesystem (stores uploads under ./storage)

Switch the provider by setting storage.provider in config.toml. Custom providers can implement pkg/storage.FileStorage and be wired in pkg/app/storage.go.

Database & Migrations

  • SQLite by default (embedded driver); connection string from config.toml
  • Migrations are embedded (see embed.go and migrations/*) and applied on startup via golangmigrate

Development

Useful commands

# run
go run ./cmd/app

# test
go test ./...

# (if you modify SQL) regenerate with sqlc
sqlc generate

Testing

There are controller tests under pkg/controller. Run all tests:

go test ./...

Contributing

See CONTRIBUTE.md for guidelines, environment setup, and the PR checklist.

Security

Please report vulnerabilities responsibly. See CONTRIBUTE.md for the security policy and contact.

License

Unless noted otherwise, this project is licensed under the Apache 2.0 License. See LICENSE or consult repository metadata.