# App File Management Help

**URL:** <https://forum.freecodecamp.org/t/app-file-management-help/654759>\
**Category:** I Built This\
**Created:** [December 8, 2023, 1:02am UTC](https://forum.freecodecamp.org/t/app-file-management-help/654759 "2023-12-08T01:02:24Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ejemy](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/ejemy/32/257673_2.png) [@Ejemy](https://forum.freecodecamp.org/u/Ejemy)\
**Post date:** [December 8, 2023, 1:02am UTC](https://forum.freecodecamp.org/t/app-file-management-help/654759/1 "2023-12-08T01:02:24Z")

</div>

Hello,

Wasn’t sure which category would be best but basically I am curious about best practice for file management in an App that uses React and Node.js.

Basically it is a personal budgeting application that uses React for front end and Node for backend (MongoDB for the database).

This is the file tree.  
—client

- node\_modules
- public (index.html)
- src (App.js, index.js, styles.css)
- package.json
- .gitattributes

— server

- .gitignore
- node\_modules
- package.json
- server.js

So basically no root package.json. Just two files with client and server. I have dual terminals up and to run it npm start both at the same time and they can connect as separate servers.  
But now I want to host this for myself on Heroku but without a root package it is difficult. Is my way even feasible? How should I restructure my files?

Sorry for the confusing post but I appreciate any feedback.

---

<div class="post-metadata">

**Author:** ![bappyasif](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/bappyasif/32/190571_2.png) [@bappyasif](https://forum.freecodecamp.org/u/bappyasif)\
**Post date:** [December 8, 2023, 12:14pm UTC](https://forum.freecodecamp.org/t/app-file-management-help/654759/2 "2023-12-08T12:14:25Z")

</div>

you can keep those two (client/server) hosted separately and use them as such, did you try that?

> [@Ejemy](#):
>
> But now I want to host this for myself on Heroku but without a root package it is difficult. Is my way even feasible? How should I restructure my files?

- what do you mean exactly?! say more if you would like

happy coding 🙂

---

<div class="post-metadata">

**Author:** ![Ejemy](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/ejemy/32/257673_2.png) [@Ejemy](https://forum.freecodecamp.org/u/Ejemy)\
**Post date:** [December 10, 2023, 11:49pm UTC](https://forum.freecodecamp.org/t/app-file-management-help/654759/3 "2023-12-10T23:49:24Z")

</div>

I would need to research more about hosting the client and server separately. Admittedly, this is my first time hosting a web app I have written myself.

I restructured my files to be so that root is the server.js and in my package.json file there is “start: node server.js” so that the server.js file starts up first and then loads the react files when app.get(“/”). This crashes heroku though.

I’ll look into hosting separately.  
THanks for the reply.

---

<div class="post-metadata">

**Author:** ![DanielHuebschmann](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/danielhuebschmann/32/415871_2.png) [@DanielHuebschmann](https://forum.freecodecamp.org/u/DanielHuebschmann)\
**Post date:** [December 11, 2023, 10:13am UTC](https://forum.freecodecamp.org/t/app-file-management-help/654759/4 "2023-12-11T10:13:22Z")

</div>

Hello!

What you are trying to do resembles the Jamstack architecture:

> **[For fast and secure sites | Jamstack](https://jamstack.org/)**
>
> What is the Jamstack? Why use the Jamstack? How do I get started? Learn what the Jamstack is all about and why it's the best approach for building faster, more secure websites.

The documentation will teach you about its approach keeping front and back ends separated and where to host them.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/freecodecamp/original/3X/e/1/e1c433102e34b46dfaa3e15d13ab9a514b127078.svg) [@system](https://forum.freecodecamp.org/u/system)\
**Post date:** [June 10, 2024, 10:13pm UTC](https://forum.freecodecamp.org/t/app-file-management-help/654759/5 "2024-06-10T22:13:41Z")

</div>

Closed on June 10, 2024, 10:13pm UTC

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.
