9ecef4c25f
This PR does too many things :( 1. Major refactoring of the dev/scripts and dev/code-generation folders. Primarily this was removing duplicate code and cleaning up some poorly written code snippets as well as making them more idempotent so then can be re-run over and over again but still maintain the same results. This is working on my machine, but I've been having problems in CI and comparing diffs so running generators in CI will have to wait. 2. Re-Implement using the generated api routes for testing This was a _huge_ refactor that touched damn near every test file but now we have auto-generated typed routes with inline hints and it's used for nearly every test excluding a few that use classes for better parameterization. This should greatly reduce errors when writing new tests. 3. Minor Perf improvements for the All Recipes endpoint A. Removed redundant loops B. Uses orjson to do the encoding directly and returns a byte response instead of relying on the default jsonable_encoder. 4. Fix some TS type errors that cropped up for seemingly no reason half way through the PR. See this issue https://github.com/phillipdupuis/pydantic-to-typescript/issues/28 Basically, the generated TS type is not-correct since Pydantic will automatically fill in null fields. The resulting TS type is generated with a ? to indicate it can be null even though we _know_ that i can't be. |
||
---|---|---|
.. | ||
Domain | ||
global | ||
Layout | ||
README.md |
Components Folder Guide
Domain Components
Domain Components are specific to the domain or section of a website. For example if you have an admin page and a user page that have specific, unshared elements. These can be placed in the Domain/Admin folder.
Rules
- Components should be prefixed with their domain name
- Examples: AdminDashboard, AdminSettings, UserProfile
Global Components
This folder is for widely reused components that provide little functionality and are primarily used for styling or consistency. Primary examples are Card and Button components.
Rules
- Global components cannot container a subfolder to be globally imported
- All elements should start with the 'Base' Prefix
- Examples: BaseButton, BaseCard, BaseTitleSection
Layout Components
The layout folder is for reusable components that are specifically only used in the layouts for the Nuxt Application. They may take props or may not. They should be larger layout style components that don't have wide the ability to be widely reused in the application.
Rules:
- Layout folder should not have a subfolder
- If they take props they should start with a 'App' Prefix.
- Examples: AppSidebar, AppHeader, AppFooter.
- If they do not they should begin with the 'The' prefix
- Examples: TheSidebar, TheHeader, TheFooter.
Page Components
The Page folder is dedicated to 'single-use' component to break up large amounts on content in the pages themselves. A good examples of this is breaking your landing page into separate sections to make it more readable and less monolithic. Page components typically consume other components.
Rules:
- These are last resort components. Only to be used when the page becomes unmanageable.
- Page components should be prefixed with their page name
- Examples: HomeAbout, HomeContact, ClientProfile