How vapor/university works
Project type and purpose
• This is a full-stack Swift web application built on the Vapor framework. It consists of two Vapor “microservices” or modules:
• api – a JSON API service exposing tutorial data (CRUD).
• client – a server-side rendered web front end that fetches data from the API, renders Leaf templates, and serves static assets.
• The README also mentions an iOS app (not in the repo), implying a third potential client of the same API.
File structure
• Top-level directories:
• api/ – a standalone Vapor Droplet configured via Config/*.json, defining Controllers, Models, Migrations.
• client/ – another Vapor Droplet with Leaf views (Resources/Views), static files (Public/), plus a RESTDriver to consume the API.
• design/ – Sketch file for the web UI mockup.
• Within each module you see an MVC pattern:
• Controllers ↔ Models ↔ Views (Leaf in client, JSON in api).
• Middleware (e.g. NotFound.swift, RequestFailedMiddleware.swift).
• Configuration files (droplet.json, server.json, mysql.json) define environment parameters.
• Package.swift & Package.pins in each module declare the Swift dependencies (Vapor, Fluent, Leaf).
README for additional insights
• Confirms the dual-service architecture: “Web application, iOS app, and API providing access to tutorials for the Vapor web framework.”