Skip to content

abhishekkushwaha4u/vitolx-backend

Repository files navigation

Contributors Forks Stargazers Issues MIT License LinkedIn


Logo

VIT OLX Backend

The Backend Code Starter to setup OLX for your own organization !
Explore the docs »

Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Contact

About The Project

This was an idea that me and my friend Shounak Bhattacharya decided to work on for our IWP J component under the able guidance of our IWP mam, Professor Malathy E, Assistant Professor, in F2 slot.

Here's why some reasons we wanted to work on something like this:

  • With COVID almost getting over, we are expecting everyone back on campus, hence freshers and all new people to populate soon.
  • The scene is vastly different for people in final year and freshers, final years are mostly about to pass out and mostly with no intention of retaining items like pillows, mattrices, books etc
  • On the other hand, frehers are in dire need of these resources as a lot of them need them all that once, but the shops at Vellore are unable to supply and meet the demand quickly, mostly students end up suffering because of lack of these basic amenities at college.

Our idea was to build a small web application to enable people to allow exchange of these items in a community friendly way, hence solving this simple problem.

Built With

Setting Up VirtualEnvironment(Follow this in case you are new)

  • virtualenv - Setting up the virtual environment
    virtualenv env
  • virtualenv activation - Activating of the virtual environment
    source env/bin/activate # Linux and Mac OS
    .\env\Scripts\activate # Windows

Getting Started

This is an example of how you may give instructions on setting up your project locally. To get a local copy up and running follow these simple example steps.

Prerequisites

You need to have Python 3.6+ installed on your system and added to path. In case you do not have python installed, you can follow this to set python up for your system.

ERD Model

This is the ER diagram of the models we used in Django for building this project. In case you need to generate one for your own, run the er_generator.sh (Runs on linux only right now, and needs graphviz as a dependency)

ER Diagram

Installation

  1. Download the frontend repo from here

  2. Clone this repo

    git clone https://github.com/abhishekkushwaha4u/vitolx-backend
  3. Setup and activate a virtualenvironment(Described Above)

  4. Install pip packages

    pip install -r requirements.txt
  5. To setup migrations(Do this after changing your database creds or use sqlite by default)

    python manage.py makemigrations
    python manage.py migrate
  6. To run the server, type

    python manage.py runserver
  7. To setup the telegram script, launch another terminal/cmd and activate the same virtual environment

  8. Navigate to telegram_bot with

    cd telegram_bot
  9. Start the bot with

    python run_bot.py

Your can serve the frontend code on any localserver and use it easily integrated with your backend on localhost.

Note: Please configure the .env before running all these projects. You can use the values provided in .env for both the telegram part and the server part. Please configure the telegram bot token before starting the server.

In order to obtain a token for yourself, follow this article.

Note: This project has a lot of configurational settings left untouched in vitolx/settings.py, please make sure to change the secret key and other dummy exposed secrets(like database credentials, etc) before running in a sensitive environment!

Usage

For more examples on the api endpoints, please refer to the Documentation

For using the telegram script, search for your bot in telegram and press start. It will ask you to setup your notification id, once you are done, you can get updates whenever someone wants to communicate with you on that part on telegram.

Roadmap

See the open issues for a list of proposed features (and known issues).

Contributing

Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the MIT License. See LICENSE for more information.

Contact

Abhishek Kushwaha- @itsAbhi1706 - abhi1234@mail.com

Backend Repo Link: Backend Repo

FrontEnd Repo Link: Fronted Repo

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published