{"id":49387932,"url":"https://github.com/tungnt1203/ruby-prep-test","last_synced_at":"2026-04-28T10:39:58.436Z","repository":{"id":335708355,"uuid":"1146764320","full_name":"tungnt1203/ruby-prep-test","owner":"tungnt1203","description":"Rails app for Ruby interview tests","archived":false,"fork":false,"pushed_at":"2026-02-24T07:12:07.000Z","size":3078,"stargazers_count":4,"open_issues_count":3,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-24T13:39:15.324Z","etag":null,"topics":["inteview","quiz","rails","ruby","ruby-on-rails"],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tungnt1203.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-01-31T16:36:43.000Z","updated_at":"2026-02-24T07:12:08.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/tungnt1203/ruby-prep-test","commit_stats":null,"previous_names":["tungnt1203/fast_quiz","tungnt1203/ruby-prep-test"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tungnt1203/ruby-prep-test","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tungnt1203%2Fruby-prep-test","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tungnt1203%2Fruby-prep-test/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tungnt1203%2Fruby-prep-test/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tungnt1203%2Fruby-prep-test/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tungnt1203","download_url":"https://codeload.github.com/tungnt1203/ruby-prep-test/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tungnt1203%2Fruby-prep-test/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32377594,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-28T09:24:15.638Z","status":"ssl_error","status_checked_at":"2026-04-28T09:24:15.071Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":["inteview","quiz","rails","ruby","ruby-on-rails"],"created_at":"2026-04-28T10:39:55.000Z","updated_at":"2026-04-28T10:39:58.403Z","avatar_url":"https://github.com/tungnt1203.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FastQuiz\n\n**Ruby Silver quiz:** 50 random questions from exam_ruby_silver question bank, timed rooms, real-time leaderboard, CSV export. Rails 8 app for Ruby group tests.\n\nCreate exams from the local question bank (17 topics, ~590 questions). Host schedules a room and shares the link. Candidates sign in, take 50 random questions (shuffled per attempt), and view results by topic.\n\n## Features\n\n- **50 random questions** — Each exam draws 50 questions from the full Ruby Silver bank.\n- **Clear topic labels** — Each question has a topic (blocks, literals, conditionals, …); badge shown during exam and on results.\n- **Timed rooms** — Set start time and duration; countdown, everyone starts together.\n- **Host dashboard** — List rooms, link to results, quick actions.\n- **Login required** — Candidates must sign in to take exams.\n- **Real-time participants** — Turbo Streams + Action Cable.\n- **Shuffle per attempt** — Question and choice order shuffled per attempt.\n- **Export results** — CSV leaderboard.\n\n## Stack\n\n- **Rails 8.1**, Ruby 3.4\n- **SQLite** (development/production)\n- **Vite** + Tailwind CSS, Stimulus, Turbo\n- **Action Cable** (Turbo Streams)\n\n## Requirements\n\n- Ruby 3.4 (see [.ruby-version](.ruby-version))\n- Node.js 18+ and Yarn (for assets)\n\n## Setup\n\n```bash\ngit clone \u003crepo\u003e\ncd fast_quiz\nbundle install\nyarn install\nbin/rails db:prepare\nbin/rails db:seed_question_bank   # Load question bank from exam_ruby_silver/*.json\nbin/rails db:seed                 # Create host user (dev)\n```\n\n## Running\n\n- **Development**\n\n  ```bash\n  bin/dev\n  ```\n\n  Open [http://localhost:3000](http://localhost:3000).\n\n- **Production (Docker)**\n\n  ```bash\n  docker build -t fast_quiz .\n  docker run -d -p 80:80 -e RAILS_MASTER_KEY=\"$(cat config/master.key)\" --name fast_quiz fast_quiz\n  ```\n\n## Usage\n\n**Roles:** *Host* (create exams, schedule rooms, see results) and *User* (take exams).\n\n1. **Host: Create exam** — Go to *Create exam* (`/pre_exams`). Submit → app creates an exam with 50 random questions from the Ruby Silver bank.\n\n2. **Host: Schedule room** — Go to *Schedule a room* (`/rooms/new`). Select an exam from the dropdown (or paste exam code), enter room name, optional instructions, start date/time, duration. Optionally require display name and/or candidate ID. Create → you get a room link.\n\n3. **Host: Share link** — Send the room URL to candidates. On the room page they see a countdown (or \"Started!\"). Host can click *Start exam now* to begin early, or wait for the timer.\n\n4. **Candidate: Join** — Open the room link (or *Join a room* and enter room code). Enter name and optional email/candidate ID if required. Click *Start exam* — if not signed in, you’ll be redirected to login and then back to the exam.\n\n5. **Candidate: Take exam** — Answer questions (order and choice order are shuffled per attempt). Submit; view score and per-question result with explanations.\n\n6. **Results** — Room *View leaderboard* shows rankings; *Export CSV* downloads name, candidate ID, score, submitted at. Per-attempt *View* opens the detailed result page with topic labels.\n\n## Deployment (Kamal)\n\n1. Set `servers.web` in [config/deploy.yml](config/deploy.yml).\n2. Configure SSH and secrets (see [.kamal/secrets](.kamal/secrets)): `RAILS_MASTER_KEY`, `KAMAL_REGISTRY_PASSWORD`.\n3. Run:\n\n   ```bash\n   bin/kamal deploy\n   ```\n\nDo not commit `config/master.key` or `.pem` files.\n\n## Tests\n\n```bash\nbin/rails test\n```\n\nController tests cover exam access (login required, `return_to` redirect) and session redirect after login.\n\n## License\n\nThis project is released under the [MIT License](LICENSE).\n\nSee also:\n\n* [Code of Conduct](CODE_OF_CONDUCT.md)\n* [Contributing](CONTRIBUTING.md)\n* [Security Policy](SECURITY.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftungnt1203%2Fruby-prep-test","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftungnt1203%2Fruby-prep-test","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftungnt1203%2Fruby-prep-test/lists"}