Welcome to the backend of Basher, an anonymous forum-based web application. Moving forward, this backend is responsible for server-side logic as well as user authentication and real-time services for the said platform.
- Axum: A lightweight, ergonomic web framework for Rust used to build the core backend API.
- GraphQL: It is an API query language that performs validation and data retrieval efficiently.
- SSE (Server-Sent Events): This allows for constant updates, which establishes an engaging interaction between the server to the clients.
- JWT (JSON Web Tokens): This ensures that the user authentication process is secure and the user session is managed in a stateless manner.
- SurrealDB: This is a multi-model database, all-in-one system, which provides the functions of database management, queries, and application programming interface.
- Shuttle: This is a cloud-oriented development service for Rust applications with a modern approach to application hosting and maintenance.
- Anonymous Posting: Users are identified by numbers, starting at
0
(the Original Poster) for each topic. This label persists across replies within the same topic. - Real-time Updates: Through SSE, the server automatically gives updates concerning new replies as well as topics.
- GraphQL Integration: The overall structure has elements that ensure it is easier to query and retrieve information.
- Secure Authentication: With the implementation of JWT, it consults user sessions to be secure and stateless.
Make sure you have the following items installed:
- Rust: A programming language that is system based and is regarded highly due to its security, speed, and ability to do many tasks at the same time.
- Cargo: The command line interface for Rust which is able to act as both a build system and a package manager.
- SurrealDB: A multi model database system that encompasses database, queries, application programming interface and authentication functionalities into one system.
- Shuttle: A cloud service for deploying applications developed in Rust.
-
Clone the repository:
git clone https://github.com/DestinEcarma/basher-backend
-
Set up the database:
-
Navigate to the
database
directory:cd basher-backend/database
-
Start the database server:
./start_dev.sh
-
Initialize the schema (only needs to be done once):
./init_schema.sh
-
-
In a new terminal, navigate to the cloned repository and start the server:
shuttle run
This project is licensed under the MIT License. See the LICENSE file for more details.