Skip to content

HubHiveApp/hubhive_backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

67 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HubHive Backend

A Python-based backend for the HubHive social networking application, providing real-time chat, event management, and location-based services for connecting local communities.

Features

  • User Management: Registration, authentication, and profile management
  • Real-time Chat: Socket.io powered chatrooms with location-based discovery
  • Event Management: Create, discover, and manage local events
  • Business Accounts: Special privileges for business owners
  • Location Services: Geo-based chatroom and event discovery
  • Payment Integration: Stripe integration for premium features
  • RESTful APIs: Well-structured API endpoints
  • Database Migrations: Alembic-based schema management

Tech Stack

  • Backend: Python 3.10+, Flask 2.3.3
  • Database: PostgreSQL with SQLAlchemy ORM
  • Real-time: Flask-SocketIO 5.3.6
  • Authentication: JWT with Flask-JWT-Extended
  • API Documentation: OpenAPI/Swagger (TBD)
  • Payments: Stripe API integration
  • Migrations: Flask-Migrate with Alembic

How to Run

  1. Install and install PostgreSQL and set up a database with username hubhive_user and password password. This is a good guide if you haven't done this before, assuming Docker is installed.

  2. Create a virtual environment.

    python -m venv .venv

  3. Activate virtual environment.

    source .venv/bin/activate

  4. Install packages.

    pip install -r requirements.txt

  5. Run the setup database script (first time only).

    python setup_database.py

  6. Pull any potential database updates and update the database (if code was updated).

    alembic upgrade head

  7. Start the actual backend.

    python run.py

By default, the backend runs on port 8000.

Project Structure

hubhive-backend/
├── app/
│ ├── models/ # Database models
│ ├── routes/ # API route handlers
│ ├── services/ # Business logic layer
│ ├── utils/ # Utilities and helpers
│ ├── database/ # Database configuration
│ ├── migrations/ # Database migrations
│ └── static/ # Static files
├── requirements.txt
├── run.py
├── setup_database.py # Database initialization
└── .env.example

About

Python-based backend for the HubHive application

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •