Skip to content

Backend for soccer pools application developed with Django-REST Framework

License

Notifications You must be signed in to change notification settings

MatiPendino/soccer-pools-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Soccer Pools API

This is the backend for the Soccer Pools project, built using Django and Django Rest Framework (DRF). The project consists of a picking game where users predict the outcomes of all matches in a league and earn points based on their predictions:

  • 3 points: Exact result prediction
  • 1 point: Correct winner prediction
  • 0 points: Incorrect prediction

Users can create groups (called tournaments) to compete with their friends.

Project Status

This project is currently in its early development stage and has not yet reached its first official version.

Features

  • Predict match outcomes and score points based on accuracy
  • Rankings based on League and Stage
  • Create and join tournaments to compete with friends
  • Social Google OAuth
  • Built using Django and Django Rest Framework
  • Docker and Docker Compose support for easy setup

Requirements

Ensure you have the following tools installed:

Installation and Setup

Follow these steps to set up and run the project locally:

  1. Clone the repository:

    git clone https://github.com/MatiPendino/soccer-pools-api.git
    cd soccer-pools-api
    

Create an .env file at the root of the project (same level as Dockerfile and docker-compose.yml) and specify the required environment variables:

  SECRET_KEY=your_secret_key
  POSTGRES_DB=soccer_pools_db
  POSTGRES_USER=your_db_user
  POSTGRES_PASSWORD=your_db_password

Build and start the Docker containers:

docker-compose up --build

Create a superuser (for accessing the admin panel):

docker-compose exec web python manage.py createsuperuser

The API should now be accessible at: http://localhost:8000

Running Tests

You can run the test suite using the following command:

docker-compose exec web python manage.py test apps

API Documentation

The API documentation can be accessed once the server is running at http://localhost:8000/api/schema/redoc

Frontend

This API is designed to work with the React Native / Expo mobile repository

Contributing

Fork the repository

Create a new branch (git checkout -b feature-name)

Make your changes and commit them (git commit -m 'Add new feature')

Push the changes to your branch (git push origin feature-name)

Create a Pull Request

License

This project is licensed under the MIT License.

About

Backend for soccer pools application developed with Django-REST Framework

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages