From d562e4152838b1d06d2e58ac6e40c23506f63c0b Mon Sep 17 00:00:00 2001 From: Christoph Haas Date: Thu, 26 Mar 2026 00:37:50 +0100 Subject: [PATCH] Add directory structure documentation to README --- README.md | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index dd28b13..dde9711 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ A self-sufficient web application to manage an ISPmail (Postfix, Dovecot, Rspamd ## Tech Stack -- **Backend**: Go with net/http (no framework), GORM for database +- **Backend**: Go with Gin framework, GORM for database - **Frontend**: SvelteKit - **Database**: MariaDB/MySQL (shared with mail server ISPmail schema) - **Auth**: JWT-based authentication @@ -25,6 +25,36 @@ A self-sufficient web application to manage an ISPmail (Postfix, Dovecot, Rspamd - Permissions controlled via `imc_users2domains` table - Admin users have access to all domains; non-admin users only to assigned domains +## Directory Structure + +``` +imc-vibe/ +├── backend/ # Go backend +│ ├── cmd/server/ # Application entry point +│ │ ├── main.go # Main function, CLI flags, HTTP server setup +│ │ ├── frontend.go # Embedding the SvelteKit build +│ │ └── embed/ # Embedded frontend files (generated) +│ └── internal/ # Internal packages +│ ├── api/ # HTTP API routing and handlers +│ │ ├── router.go # Gin route definitions +│ │ └── handlers/ # HTTP handlers +│ ├── auth/ # JWT authentication +│ ├── config/ # Configuration loading +│ ├── db/ # Database models and operations +│ └── mail/ # Mail server integration (postqueue, logs, quota) +├── frontend/ # SvelteKit frontend +│ ├── src/ +│ │ ├── app.css # Global CSS (Tailwind + daisyUI) +│ │ ├── app.html # HTML template +│ │ ├── lib/ # Shared utilities +│ │ └── routes/ # SvelteKit routes (pages) +│ ├── vite.config.ts # Vite configuration +│ └── package.json # Frontend dependencies +├── build/ # Built binary output (gitignored) +├── Makefile # Build automation +└── .env # Environment configuration (gitignored) +``` + ## Quick Start ### 1. Build