Code Monkey home page Code Monkey logo

grupalcar-api's Introduction

Grupal Car API

Grupal Car is an car pooling app to share a trip with friends.

1. List of Features

(Must)

  • User signup and send verification email
  • User verification endpoint
  • User login
  • Only loged users can list public pools and its private pools
  • Add new pools and establish admin membership
  • Pool creation with optional definition of members limit
  • Only admins can edit a pool, and not even the pool admin can delete a pool
  • Only users can see their own data and pools
  • Users can edit their own profile, includes profile picture
  • List members of a pool, retrieve members details and disable memberships
  • List all members invited by another user
  • List all invitations available (new and different code for unused) for members
  • Invite users to pools and add new members (validate code and pool limit)
  • Users can search pools by name and order them
  • By default, list pools ordered by number of members
  • Publish a trip for a pool
  • List all trips
  • Edit not departed trip information for passengers
  • Pool member can join to a trip, and become a passenger
  • Mark a trip as ended, when it reaches the destination.
  • Allow passengers to rate the trip

(Should)

  • Ask for public pools via chatbot
  • Pools are disabled when all members leave the pool
  • Next pool admin is assigned by membership seniority

(Nice)

  • show a map of near pools
  • send a notification to pool members

2. Installation

GrupalCar requires Docker and Docker-Compose to run

Previous Config:

  • Define environment variables:

    • .envs/.local/.django
    # Redis
    REDIS_URL=redis://redis:6379/0
    
    # Flower
    CELERY_FLOWER_USER=<define-a-user>
    CELERY_FLOWER_PASSWORD=<define-a-password>
    • .envs/.local/.postgres
    # PostgreSQL
    POSTGRES_HOST=postgres
    POSTGRES_PORT=5432
    POSTGRES_DB=grupalcar
    POSTGRES_USER=<define-a-user>
    POSTGRES_PASSWORD=<define-a-password>

For a development environment run:

export COMPOSE_FILE="local.yml"
$ docker-compose build
$ docker-compose up

For a production environment run:

export COMPOSE_FILE="production.yml"
$ docker-compose build
$ docker-compose up

Create an admin:

$ docker-compose run --rm django python manage.py createsuperuser

3. Load Sample data

Use the .csv file:

$ docker-compose run --rm django python manage.py shell_plus
      In [1]: exec(open('import_data.py').read())     
      In [2]: import_csv('pools.csv') 

Utilizando Fixture:

$ docker-compose run --rm django python manage.py loaddata grupalcar/pools/fixtures/pools.json

4. API Interaction

GrupalCar-API/api-interaction-samples.txt

grupalcar-api's People

Contributors

adnrbp avatar

Stargazers

 avatar

Watchers

James Cloos avatar  avatar

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.