Havyt
Learn Fastify step-by-step, by building a Recipe App. Follow the outline below/commits to see what's new at each level. Create a issue if something doesn't work for you.
Install / Use
/learn @one-aalam/HavytREADME
Learn Fastify by building a Recipe App (Typescript Ready)
Havyt is Node.js Full-Stack Web Application that's built ground-up, step-by-step to
- Introduce the essential components of Fastify like the server, router and powerful constructs like plugins, hooks and decorators all while remaining simple in its approach so that it's easy for new comers to the Framework to pick things
- Show the workings of a modern Node.js framework that values stability, extensibility and speed over simple ergnomics
- Possibly accomodate all sorts of very common use cases with time (while remaining commited to simplicity) either in the
mainbranch- Fastify for APIs
- Fastify for Server Side Web Apps
- Fastify & Auth
- Or, extended use cases like (in the different branches or forks)
- Fastify & Modern FE Frameworks (Svelte, SolidJS, Next.js, Vite, etc.)
- Fastify Fully-Tested (setup is available, but lagging currently )
- Fastify and different DB flavors(The main repo has just a hand-rolled FS based data store)
- Fastify & GraphQL
- Fastify for Serverless
- Fastify & Micro-services
Note: The repo may remain Concept-Complete First than Feature-complete, so that individual important commits could be checked out, and built upon as an exercise to learn about different features in-depth.
Commits so far...
partially documented
| Topic | Sub-topic | Commit | |------------------------------------------|------------------------------------------------------------|------------------------------------------------------------------------------------| | 1.Setup | Set-up Typescript, ESLint, Prettier, ts-node-dev | | | Husky and lint-staged | | 2. Model Entities | Add Types | | | Add Fixtures | | 3. Serve | Your first HTTP Server | | | Your First HTTP Server with Fastify | | | Use ES Syntax for a better looking code | | | Keep Fastify App and Server, close but separate | | | Catch Server exceptions, and exit the process | | 4. GET what they want | Create routes per resource | | | Get creative with /GETs | | | Type what you receive | | | Get more creative with /GET (recipe) | | | Tell what you don't have | | | Tell what you don't have (JSON edition) | | 5. Be able to get more of what they want | HTTP verb galore - more ways to receive actions (category) | | | Enforce constraints, inform data issues | | | Type easy | | | Exercise: Add more methods for recipe | | 6. Validate what you get | Add validation with JSON Schema | | | Schemas to Types | | | Add serialisation with JSON Schema | | | Re-factor: Add Per-resource schema files | | | Derive types from schemas | | | Add schemas to Get All calls |
When to expect the new changes?
There's no timeline, but I try to contribute once every week in this repo with application of one single concept. You can watch the repo, or follow me on Twitter to be notified of the updates.
Trivia
This project builds upon my past experience of building Web-Apps/APIs/Boilerplates on top of Node.js like Attic and Embrace
Related Skills
node-connect
352.5kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
111.3kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
352.5kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
352.5kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
