{"id":13691758,"url":"https://github.com/Angarsk8/realtime-todo-app","last_synced_at":"2025-05-02T15:33:02.019Z","repository":{"id":95822727,"uuid":"64333284","full_name":"Angarsk8/realtime-todo-app","owner":"Angarsk8","description":"Realtime Todo application developed with Kemal, React, ES2015 and PostgreSQL","archived":false,"fork":false,"pushed_at":"2016-11-15T21:20:27.000Z","size":3592,"stargazers_count":19,"open_issues_count":0,"forks_count":5,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-11-12T17:47:37.984Z","etag":null,"topics":["crystal","docker","ecmascript2015","kemal","postgresql","react","realtime"],"latest_commit_sha":null,"homepage":"https://kemal-ws-react-pg-todo.herokuapp.com/","language":"JavaScript","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/Angarsk8.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2016-07-27T18:43:19.000Z","updated_at":"2023-02-15T18:54:04.000Z","dependencies_parsed_at":null,"dependency_job_id":"8e092f0b-3696-4204-9894-72c4a35bc3e9","html_url":"https://github.com/Angarsk8/realtime-todo-app","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/Angarsk8%2Frealtime-todo-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Angarsk8%2Frealtime-todo-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Angarsk8%2Frealtime-todo-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Angarsk8%2Frealtime-todo-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Angarsk8","download_url":"https://codeload.github.com/Angarsk8/realtime-todo-app/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252063140,"owners_count":21688655,"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":["crystal","docker","ecmascript2015","kemal","postgresql","react","realtime"],"created_at":"2024-08-02T17:00:50.106Z","updated_at":"2025-05-02T15:32:59.460Z","avatar_url":"https://github.com/Angarsk8.png","language":"JavaScript","funding_links":[],"categories":["Examples and funny stuff"],"sub_categories":[],"readme":"# Todo Basic App (Crystal - Kemal - WebSockets - React - PostgreSQL - Docker)\n\n## Requirements\n* Crystal 0.18.7\n* PostgreSQL (v9.5.2)\n* Node (v5.11.1)\n* NPM (v3.8.6)\n* Docker (v1.12.1) \u0026\u0026 Docker-Compose (v1.8.0)\n\n\u003csup\u003e**Node and NPM are both optional if you are just going to run the app, but necessary for development since they are needed to run webpack*\u003csup\u003e\n\n## Manual Installation\nBefore you can run this program you have to install the packages that it uses. You do that with `$ shards install `.\nYou also need to configure the path to the PostgreSQL database in the files `src/db/init_db.cr` and `src/app.cr`\n\n```crystal\n# src/db/init_db.cr\nrequire \"pg\"\n\n# Configure these two variables\nDB_NAME = \"db_name\"\nPG_PATH = \"postgres://user:password@localhost:5432\"\n\n...\n```\n\n```crystal\n# src/app.cr\nrequire \"kemal\"\nrequire \"pg\"\n\nrequire \"./app/models/*\"\n\npublic_folder \"src/public\"\n\n# Configure the path of the database based on what you did in the src/db/init_db.cr file\nDB_PATH = \"postgres://user:password@localhost:5432\"\n...\n```\n\nOnce you have installed the dependencies and configured the database path, you need to create the actual database and table for the application. You do that by running  `$ crystal src/db/init_db.cr`.\n\n### Run Project\nYou can run this program in two ways:\n\n1. Compile/build the project using the command line with `$ crystal build src/notes.cr --release` and run the executable `$ ./notes`\n2. Run the program with `$ crystal src/notes.cr` (no compilation required)\n\nOnce you have run the program, you can open a browser window at [localthost:3000](http://localhost:3000) and see the actual app. You can open the app in several browser windows and see how they change in real time via websockets. In the first option you can also pass the port number as an argument to the program, like this `./notes --port \u003cport-number\u003e` and the program will show at `http://\u003cserver-ip-number\u003e:\u003cport-number\u003e`.\n\n## Installation With Docker\n\nYou nee to run one single command: `docker-compose up` or `docker-compose up -d`.\n\n## Live Demo\n\nYou can see and use a live demo of the app here: [kemal-ws-react-pg-todo.herokuapp.com](https://kemal-ws-react-pg-todo.herokuapp.com/).\n\n\u003csup\u003e**Take in mind that this is just a dummy app written in few hours as a proof of concept*\u003csup\u003e.\n\n## Development\n\n* `$ npm install`\n* `$ npm run dev \u0026\u0026 crystal src/notes.cr`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAngarsk8%2Frealtime-todo-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FAngarsk8%2Frealtime-todo-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAngarsk8%2Frealtime-todo-app/lists"}