How ronei-kunkel/larawater works
Project type and purpose
• Larawater is a backend‑driven, API‑first web application built with Laravel, implementing Clean Architecture and Domain‑Driven Design.
• Its purpose is to track and manage how many times a user drinks water, exposing endpoints for registration, authentication, recording drink events, and serving documentation via Swagger.
File structure
• Laravel core (app/, bootstrap/, config/, public/, resources/, routes/, storage/) provides the HTTP framework, middleware, routing, models, views and static assets.
• src/ holds the Clean‑Architecture modules:
• Common/ – shared types (Email, Password), exceptions, middleware (AuthMiddleware), services (Env, File, JWT).
• Module/Register, Module/Auth, Module/Drink – each follows the pattern:
– Application/Action – use‑case classes (e.g., UserRegister, UserAuth, UserDrink).
– Domain/Entity & Domain/Exception – business entities and domain‑specific errors.
– Infra/Controller – HTTP adapters exposing the use‑cases.
– Infra/Repository – data‑access adapters.
• Documentation – a module to expose documentation versions via HTTP controllers and pages.
• composer.json, package.json, vite.config.js: build tools, front‑end asset compilation.
• database/migrations, factories, seeders: persistence layer.
• public/swagger: static Swagger UI assets.
README
• Confirms a DDD + Clean Architecture approach.
• Core features: user registration, authentication, water‑drinking event logging, documentation management.
Essential details
• Environment config (.env), caching and file storage as auxiliary components.
• Custom Common/Infra/Middleware and Common/Infra/Service adapters as cross‑cutting concerns.
• Don’t omit the Postman collection or Swagger UI – show them as alternative API consumers for testing.