-
Notifications
You must be signed in to change notification settings - Fork 1
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
Optimal code structure within the code
#1190
Comments
Next action: Add CRUD module to new CLI with plop @ptrkdan I want to try assembling an existing Module (CRUD) using plop as the next action. Deadline: ~ 3/6 |
cc @ptrkdan Looks like the following path can be specified successfully. |
Thanks, @jinmayamashita! I've checked out your modifications and made my own additions with this PR. I've written my observations down below:
|
@ptrkdan Thank you for your input. I've also reviewed your PR for handling existing API modules with the CLI. I'm starting to get a clearer idea of how we can simplify it compared to before. 👍
When using clack
const group = await p.group(
{
framework: () => p.select(),
functions: ({ results }) =>
p.multiselect({
options: results.framework === 'vue' ? [] : [],
}),
}
);
That makes sense. Initially, I thought of grouping 'Feature' could also work, but I'm still exploring the nuances between these two terms 😄
Regarding APIs, it seems a separate layer from 'function' would be more appropriate. Some functions or tests may rely on the API to some extent. However, let's continue to explore ways to maintain it easily without complicating things.
I agree. First, let's use ☝ Should we discuss this during today's meeting? 🤔 |
I'm not sure if we'll have enough time to discuss this during today's meeting. Perhaps we can discuss this during tomorrow's (Friday, 03/07) meeting? |
Since we're halfway through March, let's see what we can possibly finish by the end of the month.
Realistically, it seems like it will take us longer than a month to complete all of these tasks. However, I think it may be possible to complete the experimentation in the sandbox project this month. I'll be taking a look at how to implement templates for |
TODO revision
@G-N555 @seiya0914 If you have any other addition, feel free to post it here! |
Modules
Component Diagramgraph
subgraph Legend
NYI[Not yet implemented]:::nyi
end
subgraph React
direction BT
subgraph API
API1[GraphQL]
API2[RESTful]
end
subgraph Routing
R1[React Router]:::nyi
R2[wouter]:::nyi
end
subgraph Testing
T1[Storybook]
T2[vitest]
end
subgraph Functions
F1[Authentication]:::nyi
F2[i18n]:::nyi
F3[Theming]:::nyi
end
%% Authentication dependencies
%% - This may depend on which library (Firebase, etc) we implement
F1 --> API
F1 --> Routing
%% i18n dependencies
F2 -- if route-based --> Routing
%% Theming dependencies
%% If context-based, there may be no dependencies
%% Storybook dependencies
T1 --> F1
T1 --> F2
T1 --> F3
%% vitest dependencies
T2 --> API
T2 --> Functions
end
classDef nyi stroke:#f66,stroke-width:2px,stroke-dasharray: 5 5
Footnotes
|
@jinmayamashita cc: @seiya0914 @G-N555 |
Thank you for visualizing the structure of the modules. It makes it easier to grasp the overall picture. Below are my thoughts: About the Routing I generally agree. However, as for pages, it seems reasonable to generate them dynamically based on the selected module. About the API For now, I think the API affects the Mocks and CRUD, Authentication functions. It's particularly the Below, I've prepared an Excalidraw for sharing, referencing the diagram you drew. Let's continue the discussion. https://excalidraw.com/#json=bAKOJ3f2vFZvDT3d4G_vd,cFOFPYaTEqj8UYzbkcKA4Q |
code
code
Blocked by
While it's not difficult to isolate a single module, when it comes to aspects like authentication or themes, which involve Context and Routes, a mechanism for dynamic assembly becomes necessary.
I have created an example of solving this challenge using plop.
https://github.com/jinmayamashita/sandbox-generate-react-app
The text was updated successfully, but these errors were encountered: