IMPORTANT: Since Heroku makes the apps sleep after a set period of inactivity, you might need to wait for a minute or two for the app's main page to load the first time around.
Usage instructions:
- First sign up for an account.
- Login to view the products.
- Clicking the avatar icon on top right hand corner shows a dropdown
- Click on Account to go to the accounts page, you can update the address there.
- Clicking on logout, gets you out of the application.
The online store app uses the following technologies, frameworks and libraries:
Front-end:
- Bootstrap with flex-box for layout and components.
- jQuery and AJAX to handle the behavior of the components.
- All forms are browser validated, some have custom validations set.
Back-end:
-
EJS to render the views.
-
Session management using session tokens and an in memory session store.
-- There is a sweep job every 2 hours that clears the session store of inactive sessions.
-- Binary min heap and Map to manage sessions.
-
Persistence sessions for "remember me" using auth-tokens and MongoDB atlas as a session store.
-- Cron job to clear older sessions from DB.
--There is a sweep job every 2 hours that clears the session store of inactive sessions.
-- Binary min heap and Map to manage sessions.
-
Persistence sessions for "remember me" using auth-tokens and MongoDB atlas as a session store.
-
Product info is stored in a .json file, along with images, on the server for easy access and updating.
-
User data is stored in MongoDB atlas.
Future considerations and improvements:
- For larger concurrent user, we can shift to a db based system.
- Products in db if number of products becomes too large (>1000).
- Storing multiple addresses as a linked list.
- Email verification with Mailchimp
- Search bar for products
- Product cards size