{"id":24452912,"url":"https://github.com/extensionengine/rasporedar","last_synced_at":"2025-04-13T01:01:44.990Z","repository":{"id":43083092,"uuid":"511041239","full_name":"ExtensionEngine/rasporedar","owner":"ExtensionEngine","description":"Internship project","archived":false,"fork":false,"pushed_at":"2022-09-30T08:17:52.000Z","size":759,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-03-26T18:57:24.232Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/ExtensionEngine.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}},"created_at":"2022-07-06T07:51:47.000Z","updated_at":"2023-02-14T08:41:26.000Z","dependencies_parsed_at":"2023-01-18T15:30:13.062Z","dependency_job_id":null,"html_url":"https://github.com/ExtensionEngine/rasporedar","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ExtensionEngine%2Frasporedar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ExtensionEngine%2Frasporedar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ExtensionEngine%2Frasporedar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ExtensionEngine%2Frasporedar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ExtensionEngine","download_url":"https://codeload.github.com/ExtensionEngine/rasporedar/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248650427,"owners_count":21139672,"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":[],"created_at":"2025-01-21T01:17:38.728Z","updated_at":"2025-04-13T01:01:44.911Z","avatar_url":"https://github.com/ExtensionEngine.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rasporedar - pomoćnik gospodara vremena\n\nSchool timetable generator web application. It can create the best timetables based on user's preferences (inputs and constraints).\n\n## Run project\n\n```sh\n$ docker compose up\n```\n\n## Run project in development mode\n\n```sh\n$ (cd backend \u0026\u0026 yarn) \u0026\u0026 (cd frontend \u0026\u0026 yarn) # install node packages on host machine for eslint, husky...\n$ docker compose up\n```\n\n## Migrations\n\nFor more information see the [Sequelize migrations](https://sequelize.org/docs/v6/other-topics/migrations/) docs.\n\n### Add a model (and migration)\n\n```sh\ncd backend\nnpx sequelize-cli model:generate --name User --attributes email:string,password:string\n```\n\nThis will:\n\n- Create a model file user in models folder\n- Create a migration file with name like XXXXXXXXXXXXXX-create-user.js in migrations folder.\n\nMigrate model to TS ([example](./backend/src/models/user.ts)) and remove line `'use strict';`\n\n### Run migrations\n\nFirst of all, make sure your local server is up and running.\nNow to create the table in the database run:\n\n```\n$ cd backend\n$ npx sequelize-cli db:migrate\n```\n\n### Undoing migrations\n\nIf you want to revert to old state by just running a command use:\n\n```sh\ncd backend\nnpx sequelize-cli db:migrate:undo\n```\n\nIf you want to revert back to initial state by undoing all migrations use:\n\n```sh\ncd backend\nnpx sequelize-cli db:migrate:undo:all\n```\n\nIf you want to revert back to specific migration you can pass migration name with the `--to` option:\n\n```sh\ncd backend\nnpx sequelize-cli db:migrate:undo:all --to XXXXXXXXXXXXXX-create-user.js\n```\n\n## Seed\n\nTo manage all data migrations you can use seeders. Seed files are some change in data that can be used to populate database tables with sample or test data.\n\n### Creating seed\n\nTo create a seed file run:\n\n```sh\ncd backend\nnpx sequelize-cli seed:generate --name demo-user\n```\n\nThis will:\n\n- Create a seed file in seeders folder. File name will look something like XXXXXXXXXXXXXX-demo-user.js\n\nNow you can edit that seed file to insert some data into prefered table, in this example it would be `User` table.\n\n### Run seeds\n\nTo commit a seed file or files to the database run:\n\n```sh\ncd backend\nnpx sequelize-cli db:seed:all\n```\n\n### Undoing seeds\n\nSeeders can be undone if they are using any storage. There are three possible commands for that:\n\n1. If you want to undo the most recent seed use:\n\n   `npx sequelize-cli db:seed:undo`\n\n2. If you want to undo a specific seed:\n\n   `npx sequelize-cli db:seed:undo --seed name-of-seed-as-in-data`\n\n3. If you want to undo all seeds use coomand:\n\n   `npx sequelize-cli db:seed:undo:all`\n\n## Run timetable generator from cli\n\n```\n$ ./backend/src/algorithm/cli.ts\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fextensionengine%2Frasporedar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fextensionengine%2Frasporedar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fextensionengine%2Frasporedar/lists"}