Coder Social home page Coder Social logo

rentalvista-backend's Introduction

Advanced Web Services

Flask Backend

Date Created: July 07, 2020
Date Modified: - July 20, 2020
Group: 5

Heroku Frontend Link: https://rentalvista.herokuapp.com/
Heroku Back-end Link: https://rentalvista-api.herokuapp.com/

Feature Developed: User Management System

User Management Feature

I have created user management feature for assignment 4. In this assignment, mainly, I have created backend part and some frontend part. I have developed API to signup, login, edit profile, change password, forgot password and fetch user data. On frontend part, I have developed two new pages, forgot password and change password pages. (Note: All pages for user management feature were developed earlier.)

Frontend Files created

  • Files created apart from existing files: 1.

Backend Files and Endpoints created

Note: Base project was setup by me.

  • Created additional python files in services directory:
    1. services/users.py
    2. services/token.py
    3. services/password_generator.py
  • Endpoints created in app.py file:
    1. Signup endpoint: /users/login
    2. Login endpoint: /users/login
    3. Forgot password endpoint: /users/forgot
    4. Change password endpoint: /users/change
    5. Fetching user details endpoint: /users/user
    6. Edit user details endpoint: /users/edit
    7. Logout endpoint: /users/logout

1. How to run backend on your machine

To use code base follow the steps given below:

  1. Clone the repository using https://github.com/SahilFruitwala/rentalvista-backend.git
  2. Go to the directory using terminal
  3. Install dependencies using pip install -r requirements.txt
  4. Create .env file into the root directory of project
  5. Add following environment variables
    URI = <mongodb atlas url>
    SECRET_KEY = <secret-key anything>
    SENDGRID_API_KEY = <API key of twilio>
    MAIL_DEFAULT_SENDER = <single sender email from twilio>
    
    Note: In Mongodb Atlas url remove last part which looks like &w=majority. This is because when we set environment variable on heroku it was not allowing to add data with &
  6. Run command python app.py in windows and for mac/linux python3 app.py

2. How to run frontend on your machine

To use code base follow the steps given below:

  1. Clone the repository using https://github.com/SahilFruitwala/rental-vista.git
  2. Go to the directory using terminal
  3. Install dependencies using npm install
  4. Create .env file into the root directory of project
  5. Add following environment variables REACT_APP_REGISTER_URL=<API Endpoint> Note: For local server add http: and make sure API-endpoint/Server supports CORS. For more details regarding CORS go to this Link. After adding environment variable into .env file one has to restart development server.
  6. Run command npm run start

Backend Files and Endpoints developed

Note: Base project was setup by me.

  • Created additional python files in services directory:
    1. services/users.py
    2. services/token.py
    3. services/password_generator.py
  • Endpoints created in app.py file:
    1. Signup endpoint: /users/login
    2. Login endpoint: /users/login
    3. Forgot password endpoint: /users/forgot
    4. Change password endpoint: /users/change
    5. Fetching user details endpoint: /users/user
    6. Edit user details endpoint: /users/edit
    7. Logout endpoint: /users/logout

rentalvista-backend's People

Contributors

gauravanand58 avatar krupa1711 avatar naitik100100 avatar sahilfruitwala avatar harshitha2902 avatar dependabot[bot] avatar riyaparikh1189 avatar

Watchers

James Cloos avatar  avatar Gabriella Mosquera avatar

Forkers

typemaster007

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.