Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create SPA with React and Vite #81

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

Mathieuka
Copy link
Contributor

@Mathieuka Mathieuka commented Feb 9, 2025

Issue #20

Description: In WIP...

Checklist

@Mathieuka Mathieuka force-pushed the create-react-spa-with-vite branch from 59d24d4 to d535e73 Compare February 9, 2025 00:33
@Mathieuka
Copy link
Contributor Author

@jean-michelet SonarCloud generates errors on pieces of code that are accepted or by design correct, like for example here in the test we have an error of a nested function, it is possible to configure it so that it can give us correct feedback or it is accepted which fails permanently and that we force merge ?

Capture d’écran 2025-02-09 à 01 40 14 Capture d’écran 2025-02-09 à 01 41 01

@jean-michelet
Copy link
Contributor

jean-michelet commented Feb 9, 2025

If now the tests are in /server/test, you should update this file.

If you think some files or entire folders should not be checked by sonarcloud, you should indicate them too.

For false positive, I will review them directly on the dashboard of the website, and accept the changes there.

- Update SonarCloud exclusion rules to exclude `server/test/**/*` instead of `test/**/*`
- Add `.prettierrc` file with single quote and JSX single quote setting
@jean-michelet
Copy link
Contributor

You could not leverage https://fastify-vite.dev/?

@Mathieuka
Copy link
Contributor Author

Mathieuka commented Feb 9, 2025

 @jean-michelet to guide our decisions, what is the business objective of the demo application SPA ?

Architectural Evolution

Separation of Concerns:
• Created separate server and client folders for better separation of responsibilities and thus maintain maintainability.

Server-side Changes:
• No changes to the server component itself.
• Updated execution path in the CI job and SonarQube configuration

Client-side Changes:
• Create an SPA with Vite, React and Typescript
• Added README documentation.
• Installed Prettier with rules identical to those of the server (use of single quotes).

Initial proposal, points to Define:
• Testing strategy will be defined according to the complexity of the application.
• Use CSS modules and vanilla CSS, consider adding a preprocessor or UI library only if necessary in the future

Before proceeding with further implementation, this draft is open for your suggestions and comments

cc: @EnzoDOROSARIO

@Mathieuka Mathieuka force-pushed the create-react-spa-with-vite branch from a7b9fb0 to 4bec8c8 Compare February 9, 2025 13:37
Copy link

sonarqubecloud bot commented Feb 9, 2025

@Mathieuka Mathieuka changed the title Create spa with React and Vite Create SPA with React and Vite Feb 9, 2025
@Mathieuka
Copy link
Contributor Author

Mathieuka commented Feb 9, 2025

You could not leverage https://fastify-vite.dev/?

This is relevant, if the goal is to demonstrate the use of Fastify for the generation of the SSR rendering for the client side in addition to the Fastify server

If the main purpose of the demo is to present the Fastify server and the SPA exists as a pretext to consume the API, that's different.

@jean-michelet this comes back to my initial question which is what is the business objective of the demo and here specifically of the SPA application?

@jean-michelet
Copy link
Contributor

jean-michelet commented Feb 9, 2025

The aim was to introduce Fastify/vite, in particular the react part for an SPA or even an SSR (next style) if you're prepared to put in the necessary effort: https://fastify-vite.dev/react/.

Bad news

The package does not integrate typescript well and there are probably other areas to improve directly on the package.
Unlike Fastify's backend components, there's a real lack of contributors, the maintainer really needs help: https://fastify-vite.dev/contributing.

Good news

If you really want to contribute to opensource and develop Fastify ecosystem.

My advice is to read carefully the comments on this PR I started a while ago.

@galvez is the main contributor

@onlywei has already started some work about TypeScript integration.

@Mathieuka
Copy link
Contributor Author

Sync @jean-michelet, I am in discussion with @galvez to certainly make an implementation with fastify/vue

fastify/react not being ready for production

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants