Fastify Demo is a reference implementation of a Fastify application that demonstrates community best practices for building web services with the framework.
The project addresses the need for a concrete, working example of how to structure a Fastify application following established patterns. It implements a task management API with common real-world features: task creation, retrieval, updates, and deletion alongside file uploads, CSV exports, task assignment, and role-based access control. The application uses TypeScript for type safety, MySQL for data persistence with migrations for schema management, and Swagger UI for interactive API documentation. Environment configuration is handled through dotenv files, and the setup includes both development and production modes.
Developers adopting this project should use it as a reference for structuring their own Fastify applications rather than as a starting template. It suits teams building REST APIs who want to understand how the Fastify community approaches concerns like authentication, authorization, database integration, and testing. The demo is particularly valuable for those new to Fastify who need to see how multiple features work together in a single coherent application. The project requires Node.js and includes Docker support for running a MySQL database locally, making it straightforward to get running for study or experimentation.
The project maintains active development with regular updates to dependencies and code patterns. Testing infrastructure is in place with automated test execution. The codebase includes linting configuration with tooling to both check and automatically fix style issues. Documentation is kept current with setup instructions covering environment configuration, database initialization, TypeScript compilation, and server startup procedures.