How davidbmaier/dbm works
Main Components
• Frontend ("web" directory):
• Built with Svelte/SvelteKit and uses Flowbite-Svelte as the component library.
• Contains routing (for home, artists, works, etc.), components (e.g., Notifications, WorkTile, SearchInput) and internationalization files.
• Backend ("api" directory):
• A Go web server providing API endpoints (see routes such as artists, works, users, login, files).
• Manages business logic and interactions with the underlying data store.
• Database and File Storage:
• Postgres acts as the structured database for storing information about artists, works, and users.
• Image files are stored on disk (as noted in the README).
How Components Interact
• Frontend and Backend:
• Backend Services:
• Within the backend, details like routing (different .go files under the "routes" directory) are responsible for handling specific API endpoints.
• Connections from the backend component to the Postgres database (for structured data) and a separate component for the file system (for managing image files).
• Environment Configuration:
• Although not a component per se, note the presence of .env.template files in both the web and api directories. This indicates configurable environment variables that impact deployment and runtime behavior.
Architectural Patterns and Design Principles
• Separation of Concerns: The monorepo design clearly separates the frontend and backend code bases.
• RESTful API Pattern: The backend routes (e.g., artists, works, login) demonstrate a RESTful design where different endpoints handle distinct resources.
• Modular Design: Both the frontend and backend have a directory structure that is modular (e.g., Svelte components, Go route handlers, types, and database files).
Relevant Technologies and Frameworks
• Frontend: SvelteKit, Flowbite-Svelte, Tailwind CSS (note tailwind.config.cjs), and Vite (via vite.config.ts).
• Backend: Go (with modules managed in go.mod), and Postgres for the database.
• Additional tooling: ESLint, Prettier for code quality, and npm for dependency management in the “web” project.
• Notes or annotations: for example, mention that the frontend is built using modern SvelteKit and the backend has RESTful endpoints with a focus on digital art data.