https://github.com/allansomensi/tickify-api
A simple API for managing support tickets, with JWT authentication. Made in Rust with Axum.
https://github.com/allansomensi/tickify-api
api auth crud docker just jwt mvc openapi postgresql rust sqlx swagger-ui ticket-management
Last synced: 7 months ago
JSON representation
A simple API for managing support tickets, with JWT authentication. Made in Rust with Axum.
- Host: GitHub
- URL: https://github.com/allansomensi/tickify-api
- Owner: allansomensi
- License: mit
- Created: 2025-01-13T12:16:04.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-07-04T18:15:12.000Z (7 months ago)
- Last Synced: 2025-07-04T19:28:27.718Z (7 months ago)
- Topics: api, auth, crud, docker, just, jwt, mvc, openapi, postgresql, rust, sqlx, swagger-ui, ticket-management
- Language: Rust
- Homepage:
- Size: 84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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
``` bash
git clone https://github.com/allansomensi/tickify-api.git
cd tickify
```
For the scripts:
``` elixir
cargo install just
```
For the migrations:
``` elixir
cargo install sqlx-cli
```
For the auto-run:
``` elixir
cargo install cargo-watch
```
## 2. Build and run the Docker container:
``` elixir
just services-up
```
## 3. Start server 🚀 🚀
``` elixir
just serve
```
---
# Running Tests 👨🔬
For once:
``` elixir
just test
```
For watching mode:
``` elixir
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.