# Best structure for fullstack projects?

**URL:** <https://forum.freecodecamp.org/t/best-structure-for-fullstack-projects/142047>\
**Category:** General\
**Created:** [August 16, 2017, 1:06pm UTC](https://forum.freecodecamp.org/t/best-structure-for-fullstack-projects/142047 "2017-08-16T13:06:53Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![njanne19](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/njanne19/32/29538_2.png) [@njanne19](https://forum.freecodecamp.org/u/njanne19)\
**Post date:** [August 16, 2017, 1:06pm UTC](https://forum.freecodecamp.org/t/best-structure-for-fullstack-projects/142047/1 "2017-08-16T13:06:54Z")

</div>

I’m not quite at the full stack projects (like the voting app), but I was thinking about them, and had a question on the structure for them. What is the best way to handle personal logins? I can see how you could get all the voting data off a MongoDB, but I’m not quite sure how an account login is structured to save personal data

---

<div class="post-metadata">

**Author:** ![mcockrell1](https://avatars.discourse-cdn.com/v4/letter/m/bb73d2/32.png) [@mcockrell1](https://forum.freecodecamp.org/u/mcockrell1)\
**Post date:** [August 16, 2017, 3:46pm UTC](https://forum.freecodecamp.org/t/best-structure-for-fullstack-projects/142047/2 "2017-08-16T15:46:16Z")

</div>

normally you would use a function to encrypt the password when the user creates the account and only the hashed password is stored in the db. so when the user logs on it hashes that and compares it to whats stored in the table. you can use node.js for encryption and mongoDB for storing it.

hope this answers your question.

---

<div class="post-metadata">

**Author:** ![njanne19](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/njanne19/32/29538_2.png) [@njanne19](https://forum.freecodecamp.org/u/njanne19)\
**Post date:** [August 16, 2017, 4:25pm UTC](https://forum.freecodecamp.org/t/best-structure-for-fullstack-projects/142047/3 "2017-08-16T16:25:18Z")

</div>

@mcockrell1 sorry, what I meant was is what is the structure of which the account information is stored? Like for instance, if my app brings you directly to the login screen, and then the user logs in, once logged in, where should the app redirect? Should there be unique URL’s for every user, if so how?

---

<div class="post-metadata">

**Author:** ![mcockrell1](https://avatars.discourse-cdn.com/v4/letter/m/bb73d2/32.png) [@mcockrell1](https://forum.freecodecamp.org/u/mcockrell1)\
**Post date:** [August 16, 2017, 5:48pm UTC](https://forum.freecodecamp.org/t/best-structure-for-fullstack-projects/142047/4 "2017-08-16T17:48:30Z")

</div>

im not sure if this helps because i dont really know how its done on this site. but in the real world you would create the basic page and after they entered credentials it would pull the relevant info based on the user account to populate the fields. some languages are better for this than others. for example in php it would dynamically create either part of the page or the entire page if you wanted it to. i would suppose as far this site goes it probably uses some type of package to accomplish this. so basically the app would redirect to a page template and then use the credentials to pull settings from a DB, and use those settings to populate the hmtl/css of the template page.

i hope this isnt confusing you.

---

<div class="post-metadata">

**Author:** ![commando5671](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/commando5671/32/63811_2.png) [@commando5671](https://forum.freecodecamp.org/u/commando5671)\
**Post date:** [August 17, 2017, 12:58am UTC](https://forum.freecodecamp.org/t/best-structure-for-fullstack-projects/142047/5 "2017-08-17T00:58:04Z")

</div>

The way I handled logins was to redirect to a general /home page. The homepage would be sent the details of the user that had logged in after it mounted (this was done in React).

---

<div class="post-metadata">

**Author:** ![ILM](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/ilm/32/363239_2.png) [@ILM](https://forum.freecodecamp.org/u/ILM)\
**Post date:** [January 17, 2021, 8:42pm UTC](https://forum.freecodecamp.org/t/best-structure-for-fullstack-projects/142047/6 "2021-01-17T20:42:26Z")

</div>

Closed on January 17, 2021, 8:42pm UTC


