Empowering APIs with Files, Fast.Connecting Data, Serving Presentations.Transforming Notes into Powerful Endpoints.
Table of Contents
The Delta-Notes-Endpoint project is an API server built using Rust and associated technologies such as Tide, Shuttle, and async libraries. Its core functionalities revolve around user authentication, file handling, and database management to serve PowerPoint presentations on demand based on user requests. This application allows users to login, register, and access their courses associated files while ensuring consistent testing for reliable file processing. Database interactions manage user registration and presentation data, enabling seamless communication between endpoints and the file handler component.
Feature | Description | |
---|---|---|
โ๏ธ | Architecture | Rust-based server using Shuttle web framework and Tide for routing. Depends on various async libraries and config files (Cargo.toml , Shuttle.toml ). |
๐ฉ | Code Quality | Adheres to Rust coding standards with proper use of comments and documentation. Has a modular structure with logical organization. |
๐ | Documentation | Basic readme file present with limited information about project and setup instructions. |
๐ | Integrations | Utilizes Tide and Shuttle for routing, async libraries (Tokio), and database connections. |
๐งฉ | Modularity | Well-structured with a logical folder hierarchy. Functions are grouped appropriately in src/ subdirectories. |
๐งช | Testing | Has basic testing functionality, utilizing get_courses.rs test utility file. |
โก๏ธ | Performance | Performance information is not available from given context. |
๐ก๏ธ | Security | Database connections are made with no explicit encryption or secure transmission mentioned. |
๐ฆ | Dependencies | Delta-Notes-Endpoint relies on several libraries and dependencies. |
๐ | Scalability | There is no evident discussion or design consideration for scaling the project. |
[['rs', 'Cargo.toml'], ['rust'], ['json'], ['Cargo.lock'], ['toml'], ['lock']]
- Rust programming language and Cargo package manager configuration files.
โโโ Delta-Notes-Endpoint/
โโโ Cargo.lock
โโโ Cargo.toml
โโโ Shuttle.toml
โโโ src
โ โโโ auth.rs
โ โโโ database.rs
โ โโโ enpoint.rs
โ โโโ filehalndler
โ โโโ main.rs
โโโ test.json
.
File | Summary |
---|---|
Cargo.toml | In this Cargo.toml configuration file, the Delta-Notes-Endpoint project is set up for development with various dependencies. These include async libraries, environment management tools, serialization and database modules, and web frameworks like Tide and Shuttle. This foundation supports building an API endpoint server for Delta-Notes application. |
Shuttle.toml | Configures and manages Rocket.rs web application for Delta-Notes project, defining application name and other essential settings. Key components include routing, middleware, database connections, and API endpoints. |
test.json | The test.json file in the Delta-Notes-Endpoint repository serves as configuration data for testing various file handling scenarios in the application. It follows the JSON format and contains an array of test objects, each representing a single test case. The main purpose of this file is to facilitate consistent and automated testing of the file handler module in the context of the REST API (defined by endpoint.rs ), ensuring reliable processing of user-uploaded files within the applications architecture. By providing test cases with defined file paths and filenames, developers can validate functionality related to handling various types of files, ensuring a stable and feature-rich user experience. |
src
File | Summary |
---|---|
auth.rs | Authenticates user credentials in the application. Contains login and register functions to handle requests for user verification and registration, respectively. Uses database connection from database.rs and JSON body parsing from serde library. |
database.rs | Manage database connections and interactions in the Delta-Notes-Endpoint repository. This module defines get_connection for establishing new connections, insert_data for inserting notes into the database, and select function for retrieving data based on file names. |
enpoint.rs | Process requests for login and registration endpoints. Serve files and display PowerPoint presentations on demand. Connect to database via provided connection string. |
main.rs | Auth, database, endpoint, and filehandler. Usher in the Shuttle runtime using tide function, and initiate the server with provided connection string. |
src.filehalndler
File | Summary |
---|---|
file_list.rs | Navigate through directory structures, retrieving lists of PowerPoint files associated with specific courses. This Rust module, located at src/filehalndler/file_list.rs , provides functionality to identify and collect course-specific presentation files. |
file_serving.rs | Handles file serving for the Delta-Notes-Endpoint application. Fetches requested PPTX files based on their filenames and course IDs. Sends files with correct content types directly to clients or redirects them to MS Office online viewers. |
get_courses.rs | Navigate through directory structures in the Delta-Notes-Endpoint repository to locate and retrieve specific files. In src/filehalndler/get_courses.rs , develop functionality for accessing course directories by ID, and subsequently retrieving files within those directories. |
mod.rs | Courses` module to obtain filepaths. |
test.rs | Src/filehalndler/test.rs catalyzes functional verification of Delta-Notes-Endpoints filehandler component. It utilizes get_courses testing utilities for effective assessment within this repositorys architecture. |
System Requirements:
- Rust:
version x.y.z
- Clone the Delta-Notes-Endpoint repository:
$ git clone https://github.com/Zlatovlaska11/Delta-Notes-Endpoint
- Change to the project directory:
$ cd Delta-Notes-Endpoint
- Install the dependencies:
$ cargo build
Run Delta-Notes-Endpoint using the command below:
$ cargo run
Run the test suite using the command below:
$ cargo test
-
โบ INSERT-TASK-1
-
โบ INSERT-TASK-2
-
โบ ...
Contributions are welcome! Here are several ways you can contribute:
- Report Issues: Submit bugs found or log feature requests for the
Delta-Notes-Endpoint
project. - Submit Pull Requests: Review open PRs, and submit your own PRs.
- Join the Discussions: Share your insights, provide feedback, or ask questions.
Contributing Guidelines
- Fork the Repository: Start by forking the project repository to your github account.
- Clone Locally: Clone the forked repository to your local machine using a git client.
git clone https://github.com/Zlatovlaska11/Delta-Notes-Endpoint
- Create a New Branch: Always work on a new branch, giving it a descriptive name.
git checkout -b new-feature-x
- Make Your Changes: Develop and test your changes locally.
- Commit Your Changes: Commit with a clear message describing your updates.
git commit -m 'Implemented new feature x.'
- Push to github: Push the changes to your forked repository.
git push origin new-feature-x
- Submit a Pull Request: Create a PR against the original project repository. Clearly describe the changes and their motivations.
- Review: Once your PR is reviewed and approved, it will be merged into the main branch. Congratulations on your contribution!
This project is protected under the SELECT-A-LICENSE License. For more details, refer to the LICENSE file.
- List any resources, contributors, inspiration, etc. here.