{"id":25070720,"url":"https://github.com/eroydev/rocket-taskify","last_synced_at":"2026-04-29T18:31:57.015Z","repository":{"id":275741914,"uuid":"927028306","full_name":"ERoydev/rocket-taskify","owner":"ERoydev","description":"Project assignment that a company gave to me to show my skills in backend development using Rust","archived":false,"fork":false,"pushed_at":"2025-03-23T19:01:45.000Z","size":290284,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-31T16:26:31.369Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Rust","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/ERoydev.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":"2025-02-04T09:31:06.000Z","updated_at":"2025-03-23T19:11:08.000Z","dependencies_parsed_at":null,"dependency_job_id":"ba28351f-372d-4009-a004-b04342ccadb9","html_url":"https://github.com/ERoydev/rocket-taskify","commit_stats":null,"previous_names":["eroydev/rocket-taskify"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ERoydev/rocket-taskify","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ERoydev%2Frocket-taskify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ERoydev%2Frocket-taskify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ERoydev%2Frocket-taskify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ERoydev%2Frocket-taskify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ERoydev","download_url":"https://codeload.github.com/ERoydev/rocket-taskify/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ERoydev%2Frocket-taskify/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32439166,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T18:12:22.909Z","status":"ssl_error","status_checked_at":"2026-04-29T18:11:33.322Z","response_time":110,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2025-02-06T21:33:58.818Z","updated_at":"2026-04-29T18:31:57.000Z","avatar_url":"https://github.com/ERoydev.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Task Management API Documentation\n\nThis API manages tasks with basic CRUD operations.\n\n\n## Table of Contents\n- [Tech Stack](#tech-stack)\n- [Rocket Taskify Installation Guide](#rocket-taskify-installation-guide)\n  - [Install Rust](#1-install-rust)\n  - [Install PostgreSQL](#2-install-postgresql)\n  - [Create the Database](#3-create-the-database)\n  - [Configure Database Connection](#4-configure-database-connection)\n  - [Apply Migrations](#5-apply-migrations)\n  - [Run the Project](#6-run-the-project)\n- [Endpoints](#endpoints)\n  - [GET /tasks](#get-tasks)\n  - [POST /tasks](#post-tasks)\n  - [DELETE /tasks/id](#delete-tasksid)\n  - [PUT /tasks](#put-tasks)\n  - [GET /tasks?filter=isCompleted\u0026value=true](#get-tasksfilteriscompletedvaluetrue)\n  - [Task Priority Levels](#task-priority-levels)\n- [Authentication](#authentication-system)\n- [Frontend Implementation](#frontend-implementation)\n- [Future Improvements](#future-improvements)\n\n$~~~~~~~~~~~$\n$~~~~~~~~~~~$\n# Tech Stack\n\n## 🚀 Rust\n- Systems programming language for performance and safety.\n- Guarantees memory safety and concurrency without data races.\n\n## ⚡ Rocket Framework\n- Web framework for Rust, ideal for building fast, secure web applications.\n- Supports asynchronous programming with `async/await`.\n- Type-safe routing and easy request handling (JSON, forms, etc.).\n\n## 🌊 SeaORM\n- Asynchronous ORM for Rust, built for SQL databases.\n- Supports PostgreSQL, MySQL, and SQLite.\n- Provides type-safe, efficient database interactions with migrations.\n\n$~~~~~~~~~~~$\n$~~~~~~~~~~~$\n# Rocket Taskify Installation Guide\n\nThis guide will help you set up and run the Rocket Taskify project using the Rocket framework.\n\n## Prerequisites\nBefore setting up the project, ensure you have the following installed:\n\n### 1. Install Rust\nRust is required to run this project. Install Rust using `rustup`:\n\n```sh\nMake sure you are using rustc 1.84.1 version\n```\n\nAfter installation, restart your terminal and verify the installation:\n\n```sh\nrustc --version\n```\n\n### 2. Install PostgreSQL\nThis project requires PostgreSQL as the database. Install it based on your operating system:\n\n- **Ubuntu/Debian:**\n  ```sh\n  sudo apt update\n  sudo apt install postgresql postgresql-contrib\n  ```\n- **MacOS (Homebrew):**\n  ```sh\n  brew install postgresql\n  ```\n- **Windows (Chocolatey):**\n  ```sh\n  choco install postgresql\n  ```\n\n### 3. Create the Database\nStart the PostgreSQL service and create a database named `rocket_taskify`:\n\n```sh\npsql -U postgres\nCREATE DATABASE rocket_taskify;\n\\q\n```\n\nAlternatively, use a single command:\n\n```sh\ncreatedb -U postgres rocket_taskify\n```\n\n### 4. Configure Database Connection\nNavigate to the backend directory of the project:\n\n```sh\ncd ./backend/src\n```\n\nEdit `setup.rs` to include the correct database URL:\n\n```rust\nconst DATABASE_URL: \u0026str = \"postgresql://\u003cusername\u003e:\u003cpassword\u003e@localhost:5432/rocket_taskify\";\n```\n\nReplace `\u003cusername\u003e` and `\u003cpassword\u003e` with your actual PostgreSQL credentials.\n\n### 5. Apply Migrations\n\nTo apply the database migrations, follow these steps:\n\n1. **Navigate to the backend folder**:\n   ```bash\n   cd ./backend\n\n2. Run the migration command: Replace \u003cusername\u003e and \u003cpassword\u003e with your PostgreSQL credentials:\n\n```sh\nsea-orm-cli migrate up -u postgresql://\u003cusername\u003e:\u003cpassword\u003e@localhost:5432/rocket_taskify\n```\nExample:\n```sh\nsea-orm-cli migrate up -u postgresql://admin:mysecurepassword@localhost:5432/rocket_taskify\n\n```\n\n### 6. Run the Project\nFinally, start the Rocket server by running:\n\n```sh\ncargo run\n```\n\nYour Rocket project should now be up and running!\n\n$~~~~~~~~~~~$\n$~~~~~~~~~~~$\n# Endpoints\n\n### GET /tasks\nFetch all tasks, optionally sorted by priority.\n\n**Query Parameters:**\n- `sort`: Filter tasks by priority (`high`, `medium`, `low`, `expired`, `immediate`).\n\n- `/tasks?sort=high` =\u003e returns all tasks sorted by high priority\n\n**Response:**\n- `200 OK`: Array of tasks.\n\n\n$~~~~~~~~~~~$\n### POST /tasks\nCreate a new task.\n\n**Request Body:**\n```json\n{\n    \"title\": \"Some title\",\n    \"description\": \"Some description\",\n    \"due_date\": 1738971697, // Unix Timestamp \n    \"is_completed\": false,\n    \"is_critical\": false\n}\n```\n- *To create a task my application use this data object*\n```ru\npub struct NewTask {\n    pub title: String,\n    pub description: String,\n    pub due_date: i64, // i use UNIX-Timestamp\n    pub is_completed: bool,\n    pub is_critical: bool,\n}\n```\n\n$~~~~~~~~~~~$\n### DELETE /tasks/id\nDelete a task\n\n\n$~~~~~~~~~~~$\n### PUT /tasks\nUpdate a task with new fields\n\n**Request Body:**\n```json\n{\n    \"id\": 12,\n    \"title\": \"Sometitle\",\n    \"description\": \"Some description\",\n    \"priority\": \"expired\",\n    \"due_date\": \"07-02-25\",\n    \"is_completed\": false,\n    \"is_critical\": false,\n    \"due_date_timestamp\": 1738971697\n}\n```\n- *To update a task the application is using this data object\n```ru\npub struct TaskDTO {\n    pub id: i32,\n    pub title: String,\n    pub description: String,\n    pub priority: String,\n    pub due_date: String, // i use UNIX-Timestamp\n    pub is_completed: bool,\n    pub is_critical: bool, // If user update\n    pub due_date_timestamp: i64,\n}\n```\n\n$~~~~~~~~~~~$\n### GET /tasks?filter=isCompleted\u0026value=true\n*Get tasks by completion status provide value either true or false.*\n\n\n$~~~~~~~~~~~$\n\n### Task Priority Levels\n```rs\nenum TaskPriorityLevel {\n    Low,\n    Medium,\n    High,\n    Immediate,\n    Expired,\n}\n```\n$~~~~~~~~~~~$\n$~~~~~~~~~~~$\n$~~~~~~~~~~~$\n---\n\u003ctable\u003e\n  \u003cthead\u003e\n    \u003ctr\u003e\n      \u003cth\u003eHTTP Method\u003c/th\u003e\n      \u003cth\u003eEndpoint\u003c/th\u003e\n      \u003cth\u003eDescription\u003c/th\u003e\n    \u003c/tr\u003e\n  \u003c/thead\u003e\n  \u003ctbody\u003e\n      \u003ctr\u003e\n      \u003ctd\u003eGET\u003c/td\u003e\n      \u003ctd\u003e/tasks\u003c/td\u003e\n      \u003ctd\u003e\n        Retrieves all tasks sorted by priority (DESC) and due date (ASC) by default.\n      \u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003eGET\u003c/td\u003e\n      \u003ctd\u003e/tasks?sort=\u003cem\u003epriority\u003c/em\u003e\u003c/td\u003e\n      \u003ctd\u003e\n        Retrieves all tasks sorted by priority (DESC) and due date (ASC). If a sort query parameter is provided, it filters tasks by the specified priority level (e.g. \"high\").\n      \u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003eGET\u003c/td\u003e\n      \u003ctd\u003e/tasks?filter=isCompleted\u0026amp;value=\u003cem\u003etrue/false\u003c/em\u003e\u003c/td\u003e\n      \u003ctd\u003e\n        Retrieves tasks filtered by their completion status. Use \u003ccode\u003efilter=isCompleted\u003c/code\u003e with \u003ccode\u003evalue=true\u003c/code\u003e or \u003ccode\u003evalue=false\u003c/code\u003e.\n      \u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003eGET\u003c/td\u003e\n      \u003ctd\u003e/tasks/\u0026lt;id\u0026gt;\u003c/td\u003e\n      \u003ctd\u003eRetrieves the task with the specified ID.\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003ePOST\u003c/td\u003e\n      \u003ctd\u003e/tasks\u003c/td\u003e\n      \u003ctd\u003e\n        Creates a new task. Expects task details in JSON (title, description, due_date, is_completed, is_critical).\n      \u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003ePUT\u003c/td\u003e\n      \u003ctd\u003e/tasks\u003c/td\u003e\n      \u003ctd\u003eUpdates an existing task. Expects updated task data in JSON.\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003eDELETE\u003c/td\u003e\n      \u003ctd\u003e/tasks/\u0026lt;id\u0026gt;\u003c/td\u003e\n      \u003ctd\u003eDeletes the task with the specified ID.\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003ePOST\u003c/td\u003e\n      \u003ctd\u003e/tasks/complete/\u0026lt;id\u0026gt;\u003c/td\u003e\n      \u003ctd\u003e\n        Marks the task with the specified ID as complete (and resets the critical flag) and updates its priority accordingly.\n      \u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003ePOST\u003c/td\u003e\n      \u003ctd\u003e/tasks/critical/\u0026lt;id\u0026gt;\u003c/td\u003e\n      \u003ctd\u003e\n        Marks the task with the specified ID as critical and updates its priority accordingly.\n      \u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003ePOST\u003c/td\u003e\n      \u003ctd\u003e/tasks/update_priority\u003c/td\u003e\n      \u003ctd\u003e\n        Triggers an update of task priorities for all tasks based on the defined business logic.\n      \u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\n$~~~~~~~~~~~$\n\n# Authentication System\n*Currently i have implemented simple starting point consisting of following relations:*\n\n- Users \u0026 Roles: Many-to-Many via UserRoles\n- Users \u0026 Permissions: Many-to-Many via UserPermissions\n- Roles \u0026 Permissions: Many-to-Many via RolePermissions\n- Users \u0026 Profile: One-to-One (Profile)\n\n# Frontend Implementation\n*I have implemented frontend just for me to experiment.*\n- It's not fully working thats why i don't provide instructions for it, anyway my task was for backend.\n\n![Screenshot 2025-02-09 023127](https://github.com/user-attachments/assets/a9236cfa-bfc9-43e5-931d-8193cca25b61)\n\n\n# Future Improvements\nI want to implement frontend to consume the backend with authentication:\n- i will try using solana smart contracts using anchor for education purposes.\n- i will upload simple version with front and backend version to use it as a showcase project. I will implement CD/CI git action to build, test, deploy to render.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feroydev%2Frocket-taskify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feroydev%2Frocket-taskify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feroydev%2Frocket-taskify/lists"}