{"id":20931066,"url":"https://github.com/swarnendug07/prigen","last_synced_at":"2025-04-11T13:13:25.472Z","repository":{"id":263424342,"uuid":"887251640","full_name":"SwarnenduG07/Prigen","owner":"SwarnenduG07","description":"This a fast \u0026 secure end to end encrypted  file sharing  web application. You can share file with speed and minimal clicks with e2e encryption for free. ","archived":false,"fork":false,"pushed_at":"2025-03-22T07:55:26.000Z","size":704,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-22T08:28:10.155Z","etag":null,"topics":["axum","nextjs15","react19","rust","shadcn-ui","sqlx-postgres","tailwindcss","typescript"],"latest_commit_sha":null,"homepage":"https://prigen.swarnendu.me/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SwarnenduG07.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-12T12:31:28.000Z","updated_at":"2025-03-22T07:55:24.000Z","dependencies_parsed_at":"2024-11-18T14:20:43.446Z","dependency_job_id":"5c7efed2-16cd-4d76-b67f-68a493b4b516","html_url":"https://github.com/SwarnenduG07/Prigen","commit_stats":null,"previous_names":["swarnendug07/prigen"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SwarnenduG07%2FPrigen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SwarnenduG07%2FPrigen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SwarnenduG07%2FPrigen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SwarnenduG07%2FPrigen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SwarnenduG07","download_url":"https://codeload.github.com/SwarnenduG07/Prigen/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248406016,"owners_count":21098123,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["axum","nextjs15","react19","rust","shadcn-ui","sqlx-postgres","tailwindcss","typescript"],"created_at":"2024-11-18T21:38:51.941Z","updated_at":"2025-04-11T13:13:25.452Z","avatar_url":"https://github.com/SwarnenduG07.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Rust Backend File Share with End-to-End Encryption\n\n\nThis project implements a file sharing backend using Rust, featuring end-to-end encryption to ensure the privacy and security of shared files.\n\n## Table of Contents\n\n- [Features](#features)\n- [Technologies Used](#technologies-used)\n- [Getting Started](#getting-started)\n- [API Endpoints](#api-endpoints)\n- [License](#license)\n- [Donations](#donations)\n\n## Technologies Used\n\n   - **Rust**: The primary programming language for the backend.\n   - **Axum**: A lightweight and ergonomic web framework for building APIs in Rust.\n   - **SQLx**: An asynchronous, compile-time verified SQL crate supporting multiple databases (in this case, PostgreSQL).\n   - **Argon2**: A secure password hashing library.\n   - **jsonwebtoken**: A library for encoding and decoding JSON Web Tokens (JWT) for authentication.\n   - **dotenv**: For managing environment variables in development.\n   - **Tokio**: An asynchronous runtime for Rust, powering the non-blocking operations.\n   - **Axum-Extra**: Additional utilities for Axum, including cookie support.\n   - **Tokio-Cron-Scheduler**: A scheduler library for running tasks periodically based on cron-like expressions.\n   - **Tower \u0026 Tower-HTTP**: Middleware and utilities for building robust HTTP services, including CORS and tracing support.\n   - **Serde \u0026 Serde JSON**: A framework for serializing and deserializing Rust data structures efficiently, used with JSON data.\n   - **Validator**: A validation framework for input validation in Rust.\n   - **Chrono**: A date and time library, used with `serde` for working with time formats.\n   - **UUID**: A library for generating and parsing universally unique identifiers (UUIDs).\n   - **Tracing Subscriber**: A logging library for Rust applications, providing structured logging.\n   - **AES \u0026 Block Modes**: Libraries for Advanced Encryption Standard (AES) encryption.\n   - **RSA**: A library for RSA encryption and decryption.\n   - **Rand**: A library for generating random values, used in cryptography and token generation.\n   - **Base64**: A library for encoding and decoding Base64, often used in file and cryptographic operations.\n\n## Technologies Used\n\n- **Rust**: The primary programming language for the backend.\n- **Actix Web**: A powerful, pragmatic, and extremely fast web framework for Rust.\n- **SQLx**: An asynchronous, compile-time verified SQL crate.\n- **Argon2**: Password hashing library for secure user authentication.\n- **jsonwebtoken**: Library for encoding and decoding JWT tokens.\n- **dotenv**: To manage environment variables.\n\n## Getting Started\n\nTo get a local copy of this project up and running, follow these steps:\n\n### Prerequisites\n\n- Rust (1.58 or newer) installed. You can install Rust using [rustup](https://rustup.rs/).\n- PostgreSQL installed and running. Ensure you have a database created for this project.\n\n### Installation\n\n1. Clone the repository:\n\n   ```\n   git clone https://github.com/AarambhDevHub/file-share-rust-backend.git\n   cd file-share-rust-backend\n   ```\n2. Create a .env file in the root of the project with the following variables:\n\n    ```\n    # -----------------------------------------------------------------------------\n    # Database (PostgreSQL)\n    # -----------------------------------------------------------------------------\n    DATABASE_URL=postgresql://username:password@localhost:5432/file_share_tutorial \n\n    # -----------------------------------------------------------------------------\n    # JSON Web Token Credentials\n    # -----------------------------------------------------------------------------\n    JWT_SECRET_KEY=my_ultra_secure_jwt_secret_key\n    JWT_MAXAGE=60\n    ```\n\n3. Install the necessary dependencies:\n\n    ```\n    cargo build\n    ```\n\n4. Run database migrations:\n\n    ```\n    sqlx migrate run\n    ```\n\n5. Start the server\n\n    ```\n    cargo run\n    ```\n\n## API Endpoints\n\n- **POST /api/auth/register**: Register a new user.\n- **POST /api/auth/login**: Login a user and return a JWT token.\n- **GET /api/users/me**: Retrieve the authenticated user's information.\n- **PUT /api/users/name**: Update the authenticated user's name.\n- **PUT /api/users/password**: Change the authenticated user's password.\n- **GET /api/users/search-emails**: Search for users by their email addresses.\n- **POST /api/file/upload**: Upload a file (requires authentication).\n- **GET /api/file/retrieve**: Retrieve an uploaded file by ID (requires authentication).\n- **POST /api/list/send**: Send a list of files to another user.\n- **GET /api/list/receive**: Retrieve the list of files received from another user.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fswarnendug07%2Fprigen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fswarnendug07%2Fprigen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fswarnendug07%2Fprigen/lists"}