2025-03-20 17:07:38 +07:00
2025-03-20 17:07:38 +07:00
2025-02-03 21:53:42 +07:00
2025-03-17 09:27:19 +07:00
2025-02-07 22:26:32 +07:00
2025-02-26 15:55:48 +07:00
2025-03-17 09:27:19 +07:00
2025-03-19 23:17:50 +07:00
2025-03-19 23:17:50 +07:00
2025-02-03 21:53:42 +07:00
2025-02-03 21:53:42 +07:00
2025-02-03 21:53:42 +07:00
2025-02-03 21:53:42 +07:00
2025-02-16 01:02:51 +07:00
2025-02-26 15:55:48 +07:00
2025-02-08 01:16:14 +07:00
2025-03-18 14:13:53 +07:00
2025-02-26 15:45:05 +07:00

IMPHNEN CMS API

This project is a CMS API for IMPHNEN Website

Features

  • RESTful API: Provides endpoints for managing wedding reservations.
  • Database Integration: Employs SeaORM for seamless database interactions.
  • Authentication: Authentication and Middleware
  • CORS Handling: Handling CORS with Tower HTTP CorsLayer
  • API Docs: OpenAPI Swager Ready

Prerequisites

  • Rust: Ensure that Rust is installed on your system. You can install it from rust-lang.org.
  • Database: Set up a Postgresql database and note the connection details
  • Docker: if you want build this project using docker, you need docker, You can install it from docker.com
  • Nix: if you want build this project using nix, you need nix, You can install it from nixos.org

Getting Started

  1. Clone the Repository:

    git clone https://github.com/IMPHNEN/imphnen-cms-api.git
    cd imphnen-cms-api
    
  2. Set Up Environment Variables:

    Copy a .env.exanple file:

    cp .env.example .env
    
  3. Install Dependencies:

    cargo check
    
    cargo build --release
    
    cargo install sea-orm-cli
    
  4. Run Database Migrations:

    sea-orm-cli migrate up
    
  5. Start the Server:

    cargo run -q
    

    The API will be accessible at http://localhost:3000/v1/docs.

Docker

  1. Build the Docker Image:

    docker build -t cms-api .
    
  2. Run the Docker Container:

    docker run -p 3000:3000 --env-file .env cms-api cms-api:latest
    

    The API will be accessible at http://localhost:3000/v1/docs.

Using Nix as Builder

  1. Install Nix:

    curl -L https://nixos.org/nix/install | sh
    
  2. Switch to Nix Shell or Nix Flake:

    nix develop
    
  3. Build the Project:

    nix build
    
  4. Run the Server:

     nix run
    

Contributing

Contributions are welcome! Please fork the repository and create a pull request with your changes.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Acknowledgements

S
Description
Fork of IMPHNEN/imphnen-backend-service (mirror)
Readme
2.7 MiB
Languages
Rust 97%
Nix 2%
PowerShell 0.4%
Shell 0.4%
Dockerfile 0.2%