hamidrezafarzin / TechCafe-Backend

This the backend source code of tech cafe website. used django rest framework and postgres database

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TechCafe-Backend

Table of Contents

Introduction

CafeTech is a dynamic startup dedicated to enhancing event experiences. We specialize in organizing a diverse range of events, spanning both in-person gatherings and virtual meetups. Our mission is to connect people, foster knowledge-sharing, and create unforgettable moments through our innovative event platform.

This the backend source code of tech cafe website. used django rest framework and postgres database

Features

  • Django LTS
  • Custom User Model
  • Signal attachments
  • Django RestFramework
  • JWT Authentication
  • APi Docs
  • Bank Gateway
  • Discount model
  • Checkin System for users
  • celery (background task)
  • OTP system
  • redis cache

Getting Started

To get this repository, run the following command inside your terminal

git clone https://github.com/H-VICTOOR/TechCafe-Backend.git

Installation

Before proceeding with the installation, make sure to perform the following steps:

  1. Edit Environment Files:

    • Navigate to the following paths within your project directory:

      envs/prod/db/.env.sample
      envs/prod/django/.env.sample
    • Rename these .env.sample files to .env.

    • Open each .env file and configure your environment variables as needed for your project.

  2. Edit Nginx Configuration:

    • Locate the default.conf file in the root directory of your project.

    • Open the default.conf file and customize the Nginx configuration settings according to your project requirements.

  3. Docker Setupn:

If you want to run the project locally, make sure you have Docker installed. You can download it from Docker's official website.

  1. Running the Project:

To run the project in a production environment and deploy it on a VPS, use the following command:

docker-compose-prod up -d

To run the project for development purposes, use the following command:

docker-compose up -d

These commands will start the necessary Docker containers and run your project. Make sure to replace docker-compose-prod with the actual name of your production Docker Compose file if it's different.

After starting the Docker container, follow these commands to set up your database and create a superuser:

Migrate Database:

Run the following commands to apply database migrations:

docker exec -it backend sh -c "python manage.py makemigrations accounts"
docker exec -it backend sh -c "python manage.py makemigrations gathering"
docker exec -it backend sh -c "python manage.py migrate"

create Super User:

docker exec -it backend sh -c "python manage.py createsuperuser"

Database schema

database schema

license

MIT license

About

This the backend source code of tech cafe website. used django rest framework and postgres database

License:MIT License


Languages

Language:Python 99.8%Language:Dockerfile 0.2%