fastify / demo

MIT License
13 stars 3 forks source link

Roadmap for the official Fastify Demo Project #2

Open jean-michelet opened 3 months ago

jean-michelet commented 3 months ago

Prerequisites

Issue

These are preliminary ideas, I'm open to suggestions to refine or expand this list.

To-Do List

1. Add Rate Limiter

2. Create a Simple Tasks API

3. User API for Profile and Password Management

4. Building a frontend client with Fastify/Vite

5. Registration form with email confirmation

### Tasks
mcollina commented 3 months ago

+1 Maybe can you convert it into a TODO list?

jean-michelet commented 3 months ago

My main objections would be that it's a bit simplistic, a bit far from the real applications that developers generally use and can identify to, and that there are already a lot of tutorials on the subject, but I have nothing more against it.

Why would you preferer a TODO list? Do you think we can achieve a complete demo with that? I forgot to mention that I would like to add permissions management.

mcollina commented 3 months ago

No I meant to make the tasks above a markdown todo list

jean-michelet commented 3 months ago

🤦

Lol, sorry, I will do it this week.

climba03003 commented 3 months ago

I would probably handle the CLI part. oclif seem to addressed to long staling problem of argument parsing. So I don't need to use the custom Command and Parser.

jean-michelet commented 2 months ago

If you feel like doing it, that's fine. If not, let me know. I'm going to be pretty busy for the next two weeks so I think I'll prioritise the demo for now.

jean-michelet commented 2 months ago

Should we keep a JWT authentication? I say that because I think it will increase the overall complexity of the application. I think a basic cookie session auth is enough to connect a SPA with a monolithic API, and is a good default imho. We can eventually launch a Redis instance to store sessions with high performances.

Wdyt?

mcollina commented 2 months ago

I think a basic cookie session auth is enough to connect a SPA with a monolithic API, and is a good default imho. We can eventually launch a Redis instance to store sessions with high performances.

I would do a cookie session auth.

jean-michelet commented 1 month ago

Hi, sorry for the lack of contribution on this repo but my new job is quite challenging, I'm starting to adapt so I'll continue soon.

I've created a package today to manage entity workflows (e.g. draft, published, archived). Can I create a Fastify plugin to wrap it @mcollina? It could look great on this demo and improve developer experience.

Here's the repo with some explanations: https://github.com/jean-michelet/workflow

jean-michelet commented 1 month ago

I think I was a little too enthusiastic about building the frontend part. Doing all the tasks in step 2 correctly is enough to show a lot of interesting functionality for a first release.

jean-michelet commented 1 month ago

I am not sure that @fastify/vite is ready to be included cleanly with typescript. I think it would be weird to generate a SPA without using it. Do you need help @galvez?

galvez commented 1 month ago

The more people working on @fastify/vite the merrier :)

@onlywei has made great strides with the TS setup.

galvez commented 1 month ago

Can you help @onlywei? I can help too, just a bit busy these weeks. But ping me and I'll jump right in.

onlywei commented 1 month ago

My plate is full this week and maybe the next, but I will take a look at this after that.

I do have a typescript demo with @fastify/vite. I will link it after family time.

jean-michelet commented 1 month ago

Thanks for your answers, I tried your config @onlywei and It does not work with fastify-cli. Do you know why @mcollina? Is vite compatible with fastify-cli?

Here is an issue with reproduction repo: https://github.com/fastify/fastify-cli/issues/754

onlywei commented 1 month ago

Thanks for your answers, I tried your config @onlywei and It does not work with fastify-cli. Do you know why @mcollina? Is vite compatible with fastify-cli?

Here is an issue with reproduction repo: fastify/fastify-cli#754

Ah, I've never tried with fastify-cli. I'll give it a shot when I can. I'm in the middle of a product launch right now so it could be two weeks before I can try.

jean-michelet commented 1 month ago

We fixed it, thanks!

I pushed a PR, still a WIP but the more difficult is to setup imo: https://github.com/fastify/demo/pull/21

galvez commented 1 month ago

For reference, running @fastify/vite with fastify-cli requires the client folder (Vite root) to be ignored by fastify-cli's hot reload watcher, thankfully fixed with a flag or config setting.

jean-michelet commented 3 weeks ago

@fastify/collaborators

Sorry for the ping.

I'm actively working on the demo again, do you have any recommendations? Can you plz take a look at the code and possibly point out what's wrong, or what doesn't suit you.

metcoder95 commented 3 weeks ago

Have you consider, possibly, adding a demo about the migration path from v4 to v5? I see that it can potentially help people seeking to migrate between versions to have a graphic way of what things might need adjustments.

jean-michelet commented 3 weeks ago

Good idea for the future.

jean-michelet commented 2 weeks ago

I upgrade to v5 today and ping you once ready. I opened an issue to handle authorization too, any plugin or specific strategy suggestions before I proceed?

metcoder95 commented 3 days ago

I'd say that maybe focus mostly on the breaking changes to smooth path for migration?