{"id":18537185,"url":"https://github.com/shuddha2021/rubyconnect","last_synced_at":"2026-04-15T13:34:25.881Z","repository":{"id":232415458,"uuid":"784298680","full_name":"shuddha2021/RubyConnect","owner":"shuddha2021","description":"A professional web application built with Ruby, Sinatra, and SQLite.","archived":false,"fork":false,"pushed_at":"2024-05-01T20:05:53.000Z","size":18,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-17T07:42:15.024Z","etag":null,"topics":["bootstrap","contactform","database","educational","modaldialog","professionalapp","ruby","sinatra","sqlite3","usermanagement","webapplication"],"latest_commit_sha":null,"homepage":"","language":"HTML","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/shuddha2021.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-04-09T15:19:34.000Z","updated_at":"2024-05-01T20:05:56.000Z","dependencies_parsed_at":null,"dependency_job_id":"8dc7d9ca-4fe7-4daf-9421-178c3cc8ca76","html_url":"https://github.com/shuddha2021/RubyConnect","commit_stats":null,"previous_names":["shuddha2021/rubyconnect"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shuddha2021%2FRubyConnect","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shuddha2021%2FRubyConnect/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shuddha2021%2FRubyConnect/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shuddha2021%2FRubyConnect/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shuddha2021","download_url":"https://codeload.github.com/shuddha2021/RubyConnect/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254256135,"owners_count":22040234,"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":["bootstrap","contactform","database","educational","modaldialog","professionalapp","ruby","sinatra","sqlite3","usermanagement","webapplication"],"created_at":"2024-11-06T19:37:20.998Z","updated_at":"2026-04-15T13:34:25.874Z","avatar_url":"https://github.com/shuddha2021.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RubyConnect\n\nA full-featured user management web application built with Ruby, Sinatra, and SQLite3. Modern UI, full CRUD, search \u0026 pagination, role-based badges, contact form, dark/light theme, JSON API, and comprehensive test suite — all with zero JavaScript frameworks.\n\n![Ruby](https://img.shields.io/badge/Ruby-3.x-CC342D?logo=ruby\u0026logoColor=fff)\n![Sinatra](https://img.shields.io/badge/Sinatra-4.0-000?logo=ruby\u0026logoColor=fff)\n![License](https://img.shields.io/badge/License-MIT-blue)\n![Status](https://img.shields.io/badge/status-active-brightgreen)\n\n## Features\n\n| Feature | Description |\n|---|---|\n| **Full CRUD** | Create, read, update, and delete users with server-side validation |\n| **Search** | Real-time search across names and emails with result counts |\n| **Pagination** | Automatic page splitting for large user lists |\n| **Role Badges** | Color-coded admin / member / viewer role badges |\n| **KPI Dashboard** | At-a-glance stats strip — total users, admins, members, viewers |\n| **Contact Form** | Modal contact form that persists messages to the database |\n| **Dark / Light Theme** | System-aware toggle, persisted in localStorage |\n| **JSON API** | RESTful API endpoints for programmatic access |\n| **Input Validation** | Server-side name, email, and duplicate checks |\n| **Flash Messages** | Auto-dismissing success/error notifications |\n| **Responsive** | Mobile-first layout; table columns hide gracefully on small screens |\n| **Zero JS Frameworks** | Vanilla CSS + JS — no Bootstrap, no jQuery, no build step |\n| **Test Suite** | 25+ Minitest tests covering routes, database, and edge cases |\n\n## Architecture\n\n```\napp.rb              ← Sinatra routes (web + API), helpers, config\nconfig.ru           ← Rack entry point (for Puma / deployment)\nGemfile             ← Dependencies\nRakefile            ← Database setup task\nsetup_db.rb         ← Quick seed script\nlib/\n  database.rb       ← Thread-safe SQLite3 wrapper, all queries\nviews/\n  layout.erb        ← HTML shell, nav, footer, contact modal\n  index.erb         ← Dashboard: KPIs, toolbar, table, pagination\n  form.erb          ← New / edit user form\n  not_found.erb     ← 404 page\npublic/\n  style.css         ← Full design system (CSS custom properties)\n  app.js            ← Theme toggle, modal, alert auto-dismiss\ntest/\n  app_test.rb       ← Integration tests (Rack::Test)\n  database_test.rb  ← Unit tests for Database module\n```\n\n## Getting Started\n\n### Prerequisites\n\n- **Ruby 3.x** — [install](https://www.ruby-lang.org/en/downloads/)\n- **Bundler** — `gem install bundler`\n\n### Install \u0026 Run\n\n```bash\ngit clone https://github.com/shuddha2021/RubyConnect.git\ncd RubyConnect\nbundle install\nruby setup_db.rb        # creates \u0026 seeds the database\nruby app.rb             # starts server on http://localhost:4567\n```\n\n### Run Tests\n\n```bash\nbundle exec ruby test/app_test.rb\nbundle exec ruby test/database_test.rb\n```\n\n## API Reference\n\n| Method | Endpoint | Description |\n|---|---|---|\n| `GET` | `/api/users` | All users (JSON array) |\n| `GET` | `/api/users/:id` | Single user by ID |\n| `GET` | `/api/stats` | Dashboard statistics |\n\n### Example\n\n```bash\ncurl http://localhost:4567/api/users | jq\ncurl http://localhost:4567/api/stats | jq\n```\n\n## Web Routes\n\n| Method | Path | Description |\n|---|---|---|\n| `GET` | `/` | Dashboard with search \u0026 pagination |\n| `GET` | `/users/new` | New user form |\n| `POST` | `/users` | Create user |\n| `GET` | `/users/:id/edit` | Edit user form |\n| `POST` | `/users/:id` | Update user |\n| `POST` | `/users/:id/delete` | Delete user |\n| `POST` | `/contact` | Submit contact message |\n\n## Customization\n\n| Option | File | What to change |\n|---|---|---|\n| Port | `app.rb` | Set `PORT` env var or edit `set :port` |\n| Theme colors | `public/style.css` | Edit CSS custom properties in `:root` |\n| Seed data | `lib/database.rb` | Edit the `seed!` method |\n| Roles | `lib/database.rb` + `app.rb` | Add to the CHECK constraint + validation arrays |\n| Pagination size | `app.rb` | Change `per = 10` |\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshuddha2021%2Frubyconnect","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshuddha2021%2Frubyconnect","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshuddha2021%2Frubyconnect/lists"}