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

Big upgrade: ChakraUI v3, Fastapi service & repository structure, better navbar header, backend unittest db isolation, and more! #1461

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

peter-cognicode
Copy link

@peter-cognicode peter-cognicode commented Jan 15, 2025

I decided to do a big upgrade on this project to make it more ready for larger applications. Therefore i removed the crud file in favor of a service and repository structure. This helped me a lot in the past preventing duplicate code. Also i migrated the frontend to chakraui v3 and vite v6

I don't know if this is too big for you to review, please let me know how i can help to get this merged so more people can benefit from these upgrades.

Help needed / Questions:

  • Do we still want the custom theme? it felt a bit of overkill on an example template. Since chakraui changed the way of working, i opted for the default colors for now.
  • frontend client generation github action is failing.. I removed the formatter on the generated client code (./scripts/generate-client.sh), since with new biome version it gave too many exceptions. But i dont know what is going wrong now. Maybe a different python version.. im using 12 and github is using 10?

Changes

Major changes:

  • frontend to chakraui 3.3.1
    • updated all components
    • simplified form structure with label property and automatic ids
    • added custom RouteLink for tanstack router integration
    • added pagination component
    • added system default to darkmode setting page
  • frontend menu improvements
    • added top navbar with fastapi logo and better flex styling
    • improved sidebar
  • backend to service and repository structure
    • removed crud folder, it is not scalable
    • avoids duplicate code & improves folder structure for larger apps
  • backend tests using separate database app_test
    • automatically created in postrges docker via .env
    • this avoids localdev data pollution while testing
    • playwright still uses the normal running app and database

Minor changes:

  • upgraded all dependencies in frontend
  • fixed python version to <13 because i got errors on python 13
  • improved configuration of tooling so it works in vscode (eg biome)
  • improved VSCode configuration + setting.example.json (to avoid overwriting local settings)

Screenshots

home:
image
items:
image
settings:
image

add item:
image

mobile view:
image
image

@peter-cognicode peter-cognicode changed the title upgrade backend and frontend to latest Big upgrade: ChakraUI v3, Navbar header, Fastapi service & repository structure, unittest db isolation, and more! Jan 15, 2025
@peter-cognicode peter-cognicode changed the title Big upgrade: ChakraUI v3, Navbar header, Fastapi service & repository structure, unittest db isolation, and more! Big upgrade: ChakraUI v3, Fastapi service & repository structure, Navbar header, backend unittest db isolation, and more! Jan 15, 2025
@peter-cognicode peter-cognicode changed the title Big upgrade: ChakraUI v3, Fastapi service & repository structure, Navbar header, backend unittest db isolation, and more! Big upgrade: ChakraUI v3, Fastapi service & repository structure, better navbar header, backend unittest db isolation, and more! Jan 15, 2025
@peter-cognicode peter-cognicode force-pushed the upgrade-backend-frontend branch 5 times, most recently from 97d7183 to f23cc0c Compare January 15, 2025 21:21
@peter-cognicode peter-cognicode force-pushed the upgrade-backend-frontend branch from f23cc0c to 4760ede Compare January 15, 2025 21:38
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.

1 participant