movie-pass-api

module
v0.0.0-...-2b514f4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 20, 2024 License: MIT

README ΒΆ

🎬 Movie Pass API 🎟️

Welcome to the Movie Pass API! This API was created to simplify movie ticket purchasing, manage cinemas, theaters, movies, and users. Everything is ready for you to deliver an amazing seat reservation and ticket buying experience! 🍿

Go Report Card Go Version Issues

[!WARNING]

API is currently under development. Expect potential changes and unstable behavior.

πŸš€ Main Features

  • 🎟️ Ticket Purchase: Simplify the online ticket buying process, powered by WebSockets and Server-Sent Events (SSE) for real-time updates.
  • πŸ™οΈ Cinema Management: Add and update multiple cinemas and their respective theaters with custom seat arrangements, offering full flexibility in theater layout design.
  • πŸ“½οΈ Movie Catalog: Manage the catalog of available movies with ease.
  • πŸ“… Real-Time Seat Reservation: View and reserve available seats in real time using WebSockets and Server-Sent Events (SSE) to ensure a seamless booking experience.
  • πŸ‘€ User Authentication: Complete system for registration, sign-in, and authentication, including session management with Redis.
  • πŸ›‘οΈ JWT Authentication: All routes are secured with JWT-based authentication for enhanced security.
  • πŸ—οΈ Admin Control: Admins can create cinemas, theaters, and custom seat arrangements. The system also supports session management, enabling administrators to control access and availability.
  • πŸ”‘ Role-Based Permissions: The system comes with a robust role-based permission model, allowing different levels of access for users, such as admin, cashier, and customer, ensuring secure and organized management of resources.

πŸ“‹ Installation

To get started with the Movie Pass API, follow these steps:

Requirements

Ensure you have the following installed:

  • Go (version 1.22 or higher)
  • MySQL (or any other compatible database)
  • Redis (for caching and session management)
  • Docker (optional, but recommended for deployment)
Steps
  1. Clone the repository:

    git clone https://github.com/GSVillas/movie-pass-api.git
    
  2. Install the dependencies:

    go mod tidy
    
  3. Set up the environment variables in the .env file:

    Create a .env based on .en.example
    
βš™οΈ Makefile Instructions

To simplify your development process, we have provided a Makefile with useful commands to manage keys, linting, running the application, and migrations.

Requirements
  • Generate Keys: Generates private and public ECDSA keys:

    make generate-keys
    
  • Lint the Code: Runs the linter to check for code issues:

    make lint
    
  • Clean Keys: Deletes the generated private and public keys:

    make clean
    
  • Run the Application: Runs the Go application:

    make rub
    
  • Run Migrations: Executes database migrations:

    make migration
    
  • Run Test: Executes unity tests:

    make test
    
  • Run e2e Test: Executes end to end:

    make e2e
    

Directories ΒΆ

Path Synopsis
cmd
api
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL