GithubHelp home page GithubHelp logo

rustapi's Introduction

rustapi

Tests

RESTful API template built with Rust lang. It uses MongoDB database and Axum HTTP framework.

Requirements

How to

To use this template as your project starting point, click "Use this template" at the top of this page, or click here.

Features

  • Authentication. Based on jsonwebtoken
  • Layered configuration system. Based on config-rs
  • Logs. Based on tracing
  • Error handling
  • CI Jobs based on Github actions
  • E2E Tests
  • Dependabot configuration

Project structure

โ”œโ”€โ”€ Cargo.lock
โ”œโ”€โ”€ Cargo.toml
โ”œโ”€โ”€ README.md
โ”œโ”€โ”€ config
โ”‚ย ย  โ”œโ”€โ”€ default.json    # Default configuration
โ”‚ย ย  โ”œโ”€โ”€ production.json # Production configuration (Overwrites the default)
โ”‚ย ย  โ””โ”€โ”€ test.json       # Test configuration (Overwrites the default)
โ”œโ”€โ”€ rustfmt.toml
โ”œโ”€โ”€ src
โ”‚ย ย  โ”œโ”€โ”€ database.rs
โ”‚ย ย  โ”œโ”€โ”€ errors.rs
โ”‚ย ย  โ”œโ”€โ”€ lib             # Helpers not related to the business model
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ authenticate_request.rs
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ date.rs
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ mod.rs
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ models.rs   # Base Database Model trait
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ to_object_id.rs
โ”‚ย ย  โ”‚ย ย  โ””โ”€โ”€ token.rs
โ”‚ย ย  โ”œโ”€โ”€ logger.rs
โ”‚ย ย  โ”œโ”€โ”€ main.rs
โ”‚ย ย  โ”œโ”€โ”€ models
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ cat.rs
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ mod.rs
โ”‚ย ย  โ”‚ย ย  โ””โ”€โ”€ user.rs
โ”‚ย ย  โ”œโ”€โ”€ routes
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ cat.rs
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ mod.rs
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ status.rs
โ”‚ย ย  โ”‚ย ย  โ””โ”€โ”€ user.rs
โ”‚ย ย  โ”œโ”€โ”€ settings.rs
โ”‚ย ย  โ””โ”€โ”€ tests           # E2E Tests
โ””โ”€โ”€ test.sh

Contributing

Contributors are welcome, please fork and send pull requests! If you find a bug or have any ideas on how to improve this project please submit an issue.

rustapi's People

Contributors

ndelvalle avatar dependabot[bot] avatar dependabot-preview[bot] avatar gillchristian avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.