Giter VIP home page Giter VIP logo

actix-realworld-example-app's Introduction

RealWorld Example App

Actix codebase containing real world examples (CRUD, auth, advanced patterns, etc) that adheres to the RealWorld spec and API.

This codebase was created to demonstrate a fully fledged fullstack application built with Actix including CRUD operations, authentication, routing, pagination, and more.

This implementation currently needs to be reviewed. See the Contributing section below.

For more information on how this works with other frontends, head over to the RealWorld repo.

How it works

This is an application written in Rust that utilizes Actix for developing the backend web service that powers the RealWorld application.

You can view a full list of crates being used in Cargo.toml, but here are some of the main ones of note:

  • Actix - a powerful Actor framework
  • Chrono - a Date and Time library for Rust
  • Failure - a system for creating and managing errors in Rust
  • Futures - Zero-cost Futures in Rust
  • jsonwebtoken - Create and parses JWT (JSON Web Tokens)
  • libreauth - a collection of tools for user authentication
  • Serde - a framework for serializing and deserializing Rust data structures efficiently and generically
  • Uuid - Generate and parse UUIDs
  • validator - Simple validation for Rust structs

Getting started

  • Install Rust
  • Install PostgreSQL if you don't have it already.
  • Install the Diesel CLI with the postgres feature enabled.
  • Clone this repo to a folder on your computer.
  • Copy (cp) .env.example to .env within this directory, and change the environment variables accordingly to your system.
  • Setup your database by running diesel database setup. Make sure it has completed successfully.
  • Build this project with cargo build. You are welcome to compile with --release if you'd like.
  • Run with cargo run.
  • The API URL will be whatever the BIND_ADDRESS value is in .env with the /api path included e.g. https://127.0.0.1:3000/api. Set it as such in your REST client (Postman, Insomnia, etc.), import the postman collection and start testing it out!

Contributing

Feel free to take a look at the current issues in this repo for anything that currently needs to be worked on.

You are also welcome to open a new issue if you see something is missing or could be improved upon.

actix-realworld-example-app's People

Contributors

fairingrey avatar geropl avatar

Watchers

 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.