How olyxz16/sherpa works
Project type and purpose
• This is a full-stack web application written in Go (backend) and Vue/Vite (frontend).
• The backend exposes HTTP endpoints (with healthcheck and server binaries) for user authentication, file management, and GitHub-based OAuth. It persists data to a SQL database and performs file encryption.
• The frontend is a single-page application (SPA) in Vue that lets users log in (including via GitHub), upload/download/encrypt files, and manage their account.
File structure
• Top level:
• cmd/server and cmd/healthcheck: two Go binaries (main API server and a simple healthcheck server).
• config, crypto, domain, infrastructure, interfaces: layers of a Go “clean-architecture” or hexagonal style.
• Dockerfile(s), docker-compose*.yml, Makefile: containerization, local/dev setups.
• views/: the entire Vue/Vite frontend application, including components, routing, stores, static assets.
• Layers:
• domain/model & domain/repository: business entities (User, Auth, File) and domain-level repository interfaces.
• infrastructure/persistence & infrastructure/jwt: concrete implementations (SQL via sqlc, migrations; JWT cookie handling).
• interfaces/handlers & interfaces/http & interfaces/middleware: HTTP transport, route definitions, handler wiring, auth middleware.
• crypto: file encryption and master key management.
• Configuration: config/*.go for central config and logger setup; sqlc.yaml for code generation.