question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Discuss: New project structure with split ui/logic

See original GitHub issue

What is this feature about? (1 sentence)

Discuss project structure changes which make it more straightforward where to put new UI/Logic

Why is it needed? What is the value? For whom do we build it?

Currently, project structure is a little bit messy. We have routes folder which contains a mix of UI/LOGIC and logic folder which contains only logic. It’s not clear where to put new things.

High-level overview of the feature

My suggestion: split ui/logic, move logic outside of routes to logic, so routes will only contain UI code. But this is open for a discussion.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:10 (9 by maintainers)

github_iconTop GitHub Comments

2reactions
nicosamplercommented, Jul 30, 2020

I would suggest something like this:

inside src

  • /logic
  • /utils
  • /types
  • /config
  • /theme
  • /components
  • /containers
    • /landing
    • /add-safe (creation and load)
    • /safe
    • /balances
    • /transactions
    • /apps
    • /address-book
    • /settings
1reaction
mikhailxyzcommented, Jul 30, 2020

https://reactjs.org/docs/faq-structure.html

One common way to structure projects is to locate CSS, JS, and tests together inside folders grouped by feature or route.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to structure a .NET Solution (project separation ...
Become a Patreon and get source code access: https://www.patreon.com/nickchapsasCheck out my courses: https://nickchapsas.
Read more >
How to split a solution into projects - - The Continuous Improver
Consider using Visual Studio 2010's Layer Diagram for verifying dependencies or use NDepend's excellent analysis engine. You can still use ...
Read more >
Project Structure. Repository and folders. Review of approaches.
Separation by features promotes the idea of separating business logic from the presentation by bringing logic into independent and independent ...
Read more >
How to create a front end project structure that scales and is ...
The last approach I'd like to tell about here is splitting view and state. It's similar to the flat structure, but it has...
Read more >
Structuring Your Project - The Hitchhiker's Guide to Python
In practical terms, “structure” means making clean code whose logic and dependencies are clear as well as how the files and folders are...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found