Skip to content

Developer Documentation

Sravanika Doddi edited this page Mar 28, 2018 · 15 revisions

Welcome to Cracking The Resume! Cracking The Resume is a web application where users can upload their resumes and have it reviewed by other users (specific to CS majors). Users also have the ability to upvote, downvote, and comment on other users’ resumes.

How to Run and Install the web app locally:

Step 1:

  • Install Node.js on your local machine: https://nodejs.org/en/
  • Run and execute the file
  • Now you have npm on your machine

Step2:

  • Install MongoDB on your local machine: https://www.mongodb.com/download-center?jmp=nav#atlas
  • Download the correct version based on your operating system.
  • IN Windows: To set up MongoDB, in the C drive, create a data directory and inside the data directory create a db directory. Once you do this, run the command $mongod inside the C:/Program Files/MongoDB/Server/3.6/bin the bin directory

Step 3:

  • In your Mac (Mac) or Windows Terminal(Powershell):

$ git clone https://github.com/levys19/Cracking_the_resume.git

  • After you cloned the repository, go inside the directory (~/Cracking_the_resume)

$ cd Cracking_the_resume

Step 4: From the Cracking_the_resume directory, enter the cracking_the_resume directory (~/Cracking_the_resume/cracking_the_resume)

$ cd cracking_the_resume

Then run: $ npm install

to download all the dependencies.

Lastly run: $npm start

to start the server Now, the web app can be launched in your local web browser on locolhost:3000 *Please make sure your mongod server is running, when you're running locolhost

Technologies we used:

Frontend:

The frontend of our web application is written in ejs (templating engine), CSS, and Javascript. Ejs(Embedded Javascript Template) is very similar to HTML. For more information on Ejs, please use this link: http://ejs.co/

Backend:

On the backend, our web application is implemented in Node js with Express as the web framework. We also used MongoDB to set up our database. For more information on MongoDB, please visit: https://docs.mongodb.com/manual/

Deployment:

We host our web application on Amazon web services EC2 instances. It uses an ubuntu server and you can visit our website at http://reschk.me

Structure of the Code Base

Once you clone the directory with the instructions provide above, go into the cracking_the_resume directory. Inside the directory you will see four main directories:

Database: The name of the database is called Cracking_The_Resume. There is a collection called users inside the database. The users collection contains all the information about the users such as Firstname, Lastname, Email, username, and password.

Models: This directory contains the schemas for users, resumes, comments, upvotes, and downvotes.

  • user.js: This file contains the UserSchema
  • resumes.js: This file contains the resume schema that links to the rink

public: This directory contains stylesheets and the Javascript files that are used for the frontend. In the Express framework, it is necessary to put the stylesheets and Javascript files in this directory as they are static files.

routes: This directory contains Javascript files which are the routes for each of the pages.

  • index.js: File where the index page is rendered and also contains information on how the login system is works with the passport library.
  • split.js: Renders the split page
  • accounts.js: Renders the account page, and store the comments in the database
  • redirect.js: Renders the redirect page, and also make a post request to get put the signup information in the database. It stores the users in the users collection and the resumes in the resumes collection (using the multer library).
  • resumeViewing.js: Render the resume viewing pages where a user can comment on other's users resumes.
  • settings.js: Renders the settings page where users can update password
  • signUp.js: Renders the signup page where users can sign up

views: This directory contains all the ejs files with all the pages that are available for the web application.

  • homepage.ejs: Home page for user login and sign up options.
  • split.ejs: Directs user to their own or other's resume.
  • signUp.ejs: User enter's information to sign up for an account.
  • accounts.ejs: View user's own resume and likes, dislikes and comments.
  • resumeViewing.ejs: View other user's resumes and like, dislike and comment on them.
  • redirect.ejs: Alerts user upon successfully registering, allows them to log in with their account.
  • settings.ejs: Allows user to update their current email or password.

App.js: The app.js file located inside the craking_the_resume directory is the main file that the application will run on.

Package.json: contains all the dependencies for the web application.

If you have any questions, please don't hesitate to contact us at https://gitter.im/Cracking_the_resume/Lobby