{"id":15152485,"url":"https://github.com/warborn/passlist","last_synced_at":"2026-01-19T23:02:19.323Z","repository":{"id":89987166,"uuid":"55026190","full_name":"warborn/passlist","owner":"warborn","description":"An API made with Ruby on Rails to manage the attendance of students enrolled in a course.","archived":false,"fork":false,"pushed_at":"2017-08-10T20:11:20.000Z","size":71,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-13T13:18:29.945Z","etag":null,"topics":["api-rest","rails4"],"latest_commit_sha":null,"homepage":"","language":"Ruby","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/warborn.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":"2016-03-30T02:33:03.000Z","updated_at":"2017-12-17T05:52:44.000Z","dependencies_parsed_at":"2023-05-30T19:45:36.627Z","dependency_job_id":null,"html_url":"https://github.com/warborn/passlist","commit_stats":{"total_commits":50,"total_committers":1,"mean_commits":50.0,"dds":0.0,"last_synced_commit":"d404b34efc3b31da4862b98d56597ef0ae6bfde7"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/warborn%2Fpasslist","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/warborn%2Fpasslist/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/warborn%2Fpasslist/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/warborn%2Fpasslist/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/warborn","download_url":"https://codeload.github.com/warborn/passlist/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247639455,"owners_count":20971541,"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":["api-rest","rails4"],"created_at":"2024-09-26T16:02:34.429Z","updated_at":"2026-01-19T23:02:19.280Z","avatar_url":"https://github.com/warborn.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Passlist\n\n## About\n\nIt's an application to make easier and agile taking record of the attendance of students enrolled in a course.\n\nYou can see the [repo](https://github.com/warborn/android_passlist) of the android client.\n\n##### Rails features applied: \n\n- Authentication with [Devise Token Auth](https://github.com/lynndylanhurley/devise_token_auth)\n- Send account verification email with [Mailgun](https://github.com/jorgemanrubia/mailgun_rails)\n- Import CSV file to register students\n- Internationalization (Spanish)\n- JSON Serialization with [ActiveModelSerializers](https://github.com/rails-api/active_model_serializers)\n\n## Features\n\nA new user can register a new account, confirm it via email and then sign in.\n\nThe user can create courses (groups), with the following information:\n- ID\n- Subject\n- Start Date (of schoolar period)\n- End Date (of schoolar period)\n- Class Days\n\nNext, the application will create a schedule (calendar) based on the class days, start and end date of the new course.\n\nThe user can import a ***.csv*** file with the following form to add new students to a given course and also update them.\n\n![Screenshot of a .csv file contents](https://s20.postimg.org/9djdkkmy5/import.png)\n\nThe API allows to query the following information:\n- Courses (grupos)\n- Schedule (a calendar of classes)\n- A single Class to register the attendance of students\n\n## Installation\n\nFirst you need to config the mailer method, currently using mailgun, set environment variables accordingly.\n\n```ruby\nconfig.action_mailer.delivery_method = :mailgun\nconfig.action_mailer.mailgun_settings = {\n  api_key: ENV['MAILGUN_KEY'],\n  domain: ENV['MAILGUN_KEY']\n}\n```\n\ncd into the project directory and execute the following commands:\n\n```sh\nbundle install\nrake db:migrate\nrails s\n```\n\n## Usage\n\n##### Users endpont:\n\n- A **POST** request to ***/auth*** will create a new user:\n\n```json\n{\n    \"user\": {\n        \"email\": \"email@email.com\",\n        \"last_name\": \"Test\",\n        \"maiden_name\": \"User\",\n        \"first_name\": \"John Doe\",\n        \"password\": \"password\",\n        \"password_confirmation\": \"password\"\n    }\n}\n```\n\n- A **POST** request to ***/auth/sign_in*** will sign in the user:\n\n```json\n{\n    \"user\": {\n        \"email\": \"email@email.com\",\n        \"password\":\n         \"password\"\n    }\n}\n```\n\n- A **DELETE** request to ***/auth/sign_out*** will log out the current logged in user.\n\n##### Courses (groups) endpoint:\n\n- A **POST** request to ***/groups*** will create a new group:\n\n```json\n{\n    \"group\": {\n        \"name\": \"2101\",\n        \"subject\": \"Programación 01\",\n        \"begin_date\": \"2016-02-01\",\n        \"end_date\": \"2016-05-27\",\n        \"classdays_attributes\": [\n            {\n                \"day\": \"Lunes\",\n                \"begin_time\": \"08:00\",\n                \"end_time\": \"10:00\"\n            },\n            {\n                \"day\": \"Miércoles\",\n                \"begin_time\": \"08:00\",\n                \"end_time\": \"10:00\"\n            },\n            {\n                \"day\": \"Viernes\",\n                \"begin_time\": \"08:00\",\n                \"end_time\": \"10:00\"\n            }\n        ]\n    }\n}\n```\n\n- A **GET** request to ***/groups*** will retrieve a list with the groups registered\nby the current user.\n\n```json\n[\n    {\n        \"id\": 1,\n        \"name\": \"2101\",\n        \"subject\": \"Base de datos\",\n        \"begin_date\": \"2016-02-01\",\n        \"end_date\": \"2016-05-27\"\n    },\n    {\n        \"id\": 2,\n        \"name\": \"3101\",\n        \"subject\": \"Grupo de Ejemplo 1\",\n        \"begin_date\": \"2016-02-01\",\n        \"end_date\": \"2016-02-08\"\n    },\n    {\n        \"id\": 3,\n        \"name\": \"3102\",\n        \"subject\": \"Grupo de Ejemplo 2\",\n        \"begin_date\": \"2016-02-01\",\n        \"end_date\": \"2016-02-08\"\n    }\n]\n```\n\n- A **GET** request to ***/groups/:id*** will retrieve a single group along with the schedule:\n\n```json\n{\n    \"group\": {\n        \"id\": 1,\n        \"name\": \"2101\",\n        \"subject\": \"Base de datos\",\n        \"begin_date\": \"2016-02-01\",\n        \"end_date\": \"2016-05-27\"\n    },\n    \"classes\": [\n        {\n            \"id\": 1,\n            \"date\": \"Lunes 01 de Febrero del 2016\",\n            \"active\": true\n        },\n        {\n            \"id\": 18,\n            \"date\": \"Miércoles 03 de Febrero del 2016\",\n            \"active\": true\n        },\n        {\n            \"id\": 35,\n            \"date\": \"Viernes 05 de Febrero del 2016\",\n            \"active\": true\n        },\n        {\n            \"id\": 2,\n            \"date\": \"Lunes 08 de Febrero del 2016\",\n            \"active\": true\n        },\n        {\n            \"id\": 19,\n            \"date\": \"Miércoles 10 de Febrero del 2016\",\n            \"active\": true\n        }\n    ]\n}\n```\n\n - Send a **POST** request to ***/groups/:id/students/import*** with a ***.cvs*** file to import a list of students. \nThis endpoint need a key of ***student_import[file]*** with the file as a value, an example using HTML will be:\n\n```html\n\u003cform action=\"/groups/1/students/import\" method=\"***POST***\" enctype=\"multipart/form-data\"\u003e\n  \u003cinput type=\"file\" name=\"student_import[file]\"\u003e\n\u003c/form\u003e\n```\n\n##### Classes endpoint:\n\n- A **GET** request to ***/classes/:id*** will retrieve the info about a class and the list of students enrolled:\n\n```json\n{\n    \"class\": {\n        \"id\": 1,\n        \"date\": \"Lunes 01 de Febrero del 2016\",\n        \"active\": true\n    },\n    \"students\": [\n        {\n            \"id\": 1,\n            \"account_number\": \"300306064\",\n            \"last_name\": \"Lovato\",\n            \"maiden_name\": \"Quiñones\",\n            \"first_name\": \"Victoria\",\n            \"assist\": true\n        },\n        {\n            \"id\": 2,\n            \"account_number\": \"301306064\",\n            \"last_name\": \"Armas\",\n            \"maiden_name\": \"Gallardo\",\n            \"first_name\": \"Concepción\",\n            \"assist\": true\n        },\n        {\n            \"id\": 3,\n            \"account_number\": \"302306064\",\n            \"last_name\": \"Coronado\",\n            \"maiden_name\": \"Limón\",\n            \"first_name\": \"Ana María\",\n            \"assist\": true\n        }\n    ]\n}\n```\n\n- A **PATCH** request to ***/classes/:id/students/:student_id/assist*** will update between true or false the attendance status of a student for a given class.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwarborn%2Fpasslist","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwarborn%2Fpasslist","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwarborn%2Fpasslist/lists"}