How eef-m/eventhub works
Project type and purpose
• This is a full-stack web application called “EventHub” for creating, managing, and registering users to events.
• Frontend: Single-Page Application built in Vue 3 serviced by Vite, Vue Router, Pinia, and styled with Tailwind CSS.
• Backend: REST API in Go using Gin for routing, GORM for ORM, and JWT for authentication.
• Database: PostgreSQL stores users, organizers, events, registrations, feedback, tickets.
File structure
• Top-level splits into two directories:
• backend/ – all Go code, organized by controllers, models, repositories, DTOs, middleware, routes, initializers, utils, and seeders.
• frontend/ – Vue 3 app organized by components (organizer vs participant vs shared UI), pages (views), services (API wrappers), stores (Pinia), router, assets, and configuration (Vite, tsconfig).
• Notice backend patterns:
• Initialization steps: load.env → connect.db → sync.db.
• Middleware for CORS, JWT-based authorization (“require”).
• Notice frontend layers:
• UI component library (./src/components/ui) for reusable primitives.
• Domain-specific components under organizer/ and participant/.
• Pages under src/pages map to views rendered by Vue Router.
• Services call backend endpoints.
• Stores manage application state.
README for additional insights
• Backend uses Gin, GORM, PostgreSQL, JWT.
• Frontend uses Vue Router for navigation and Pinia for state.
• No mention of additional external microservices—this is a monolithic API.
Elements
• Clear labels: “Vue SPA”, “Gin REST API”, “PostgreSQL”.
• Browser → API (HTTP request)
• API → DB (SQL queries)
• DB → API (query results)
• API → Browser (JSON responses)
• Blue rectangles for frontend components
• Green for backend services