Skip to content

A simple API for managing support tickets, with JWT authentication. Made in Rust with Axum.

License

Notifications You must be signed in to change notification settings

allansomensi/tickify-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tickify API 🎟

Tickify is a support ticket management API built in Rust using Axum. It allows to efficiently manage support tickets, users, and authentication.

Features

  • CRUD Operations for Tickets and Users
  • JWT Authentication for secure user login
  • Role-based Access Control (RBAC) for managing permissions
  • Logging to console and files for monitoring and debugging
  • PostgreSQL Database with sqlx
  • Error Handling using thiserror for structured and clear error messages
  • MVC Architecture for clean separation of concerns
  • OpenAPI (Swagger) Documentation auto-generated with utoipa
  • Environment Variable Configurations for easy environment management
  • Data Validation using validator for safe input
  • Secure Password Encryption with argon2
  • CORS Support to manage cross-origin requests
  • Migrations with sqlx for database versioning
  • Utility scripts with just
  • Ticket export to PDF and CSV

Getting Started 🎯

Prerequisites:

  • Rust (latest stable version)
  • Docker and Docker Compose
  • SQLX-cli for migrations
  • Cargo-watch for auto-run
  • Just for scripts

1. Installation

git clone https://github.com/allansomensi/tickify-api.git
cd tickify

For the scripts:

cargo install just

For the migrations:

cargo install sqlx-cli

For the auto-run:

cargo install cargo-watch

2. Build and run the Docker container:

just services-up

3. Start server 🚀 🚀

just serve

Running Tests 👨‍🔬

For once:

just test

For watching mode:

just test-watch

API Documentation 📚

API endpoints and usage details are documented using Swagger UI and OpenAPI with Utoipa.

The full documentation is available in the openapi.json file, which can be accessed and imported as needed. Run the application and navigate to /swagger-ui to view the interactive Swagger documentation.

About

A simple API for managing support tickets, with JWT authentication. Made in Rust with Axum.

Topics

Resources

License

Stars

Watchers

Forks