Skip to content

Organiza viajes en auto compartidos entre grupo de conocidos

Notifications You must be signed in to change notification settings

adnrbp/GrupalCar-API

Repository files navigation

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:https://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

About

Organiza viajes en auto compartidos entre grupo de conocidos

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published