Skip to content

leolupianez/travelstories

Repository files navigation

TravelStories

A full stack application where users can share their recent travel stories and view other users' stories.

View · Report Bug · Request Feature

Table of Contents
  1. How It's Made
  2. Getting Started
  3. Optimizations
  4. Lessons Learned

How It's Made:

The app was made NodeJS. The front end uses Handlebars to build semantic templates which we display to the users with data sent from the controller. In the backend we used MongoDB for the database, and ExpressJS for creating the web application. For the user authentication, the Passport middleware was used with the addition of bcryptjs for securing and hashing all passwords.

Tech Used:

JS Tailwind ExpressJS NodeJS

Getting Started

Environment Variables

The following environment variables are needed to run the application:

  1. Port where the server will be ran
    PORT = 3000
    
  2. Your MongoDB connection string
    MONGO_URI = INSERT URL
    
  3. The database name on wish the data will be stored
    MONGO_DB = INSERT DATABASE NAME
    
  4. The session secret used to hash the session
    SESSION_SECRET = INSERT RANDOM STRING
    

Installation

  1. Install NPM packages
    npm install
  2. Start the development server
    npm run dev
  3. Access server at https://localhost:5000

Optimizations

All user passwords are hashed using bcryptjs before storing them in the database. A relationship between the stories and users was added to prevent having to request data from the database multiple times. The application files are organized in their respective areas for easy change/addition in the future.

Lessons Learned

By building the full-stack application with MVC in mind, when something needs to be fixed or added, it is easy to find where you need to go to do so. For example, if I wanted to change something related to the stories, I know that the changes would need to be made in the stories route or view.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published