{"id":15091722,"url":"https://github.com/leoelicos/submitted","last_synced_at":"2026-02-23T00:04:48.526Z","repository":{"id":38838657,"uuid":"495818457","full_name":"leoelicos/submitted","owner":"leoelicos","description":"Wordpress-style Tech Blog","archived":false,"fork":false,"pushed_at":"2023-09-17T00:56:23.000Z","size":349,"stargazers_count":0,"open_issues_count":5,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-06T08:05:12.515Z","etag":null,"topics":["expressjs","handlebarsjs","mvc-pattern","nodejs","sequelizejs"],"latest_commit_sha":null,"homepage":"https://leoelicos-tech-blog.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/leoelicos.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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-05-24T12:43:45.000Z","updated_at":"2023-03-11T15:19:52.000Z","dependencies_parsed_at":"2024-09-19T19:01:03.378Z","dependency_job_id":null,"html_url":"https://github.com/leoelicos/submitted","commit_stats":null,"previous_names":["leoelicos/submitted"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/leoelicos/submitted","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leoelicos%2Fsubmitted","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leoelicos%2Fsubmitted/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leoelicos%2Fsubmitted/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leoelicos%2Fsubmitted/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leoelicos","download_url":"https://codeload.github.com/leoelicos/submitted/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leoelicos%2Fsubmitted/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29731686,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-22T20:09:16.275Z","status":"ssl_error","status_checked_at":"2026-02-22T20:09:13.750Z","response_time":110,"last_error":"SSL_read: 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":["expressjs","handlebarsjs","mvc-pattern","nodejs","sequelizejs"],"created_at":"2024-09-25T10:43:03.358Z","updated_at":"2026-02-23T00:04:48.501Z","avatar_url":"https://github.com/leoelicos.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# submitted!\n\n![express](https://img.shields.io/badge/4.18.1-0?label=Express\u0026style=for-the-badge\u0026labelColor=white\u0026color=black) ![handlebars](https://img.shields.io/badge/6.0.6-0?label=express-handlebars\u0026style=for-the-badge\u0026labelColor=white\u0026color=black) ![sequelize](https://img.shields.io/badge/6.20.1-0?label=Sequelize\u0026style=for-the-badge\u0026labelColor=white\u0026color=black) ![mysql2](https://img.shields.io/badge/2.3.3-0?label=mysql2\u0026style=for-the-badge\u0026labelColor=white\u0026color=black)\n\n---\n\n## why \n\nRead and create blogs.\n\nThis application uses npm packages `express`, `express-handlebars`, `express-session`, `sequelize`, `connection-session-sequelize`, `bcrypt`, `mysql2` and `dotenv`.\n\nCRUD API calls are also defined for back end development allow a developer to test requests using Insomnia to prepare for front-end integration in the future.\n\nAs defined in [Issues](https://github.com/leoelicos/submitted/issues), my future direction for submitted includes options to create Categories and Tags on the front end, as well as select them while creating a Blog. Currently they can only be created from the back end.\n\nI made this application to learn about full-stack applications created with Model-View-Controller, and I used GitHub Projects and various Pull Requests to create this app: https://github.com/leoelicos/submitted/projects/1\n\n## Table of Contents\n\n- [Usage](#usage)\n- [Screenshots](#screenshots)\n- [Installation for API testing in Insomnia](#installation-for-api-testing-in-insomnia)\n- [Example of API response](#example-of-api-response)\n- [Credits](#credits)\n- [License](#license)\n\n## Usage\n\nVisit [submitted](https://leoelicos-tech-blog.herokuapp.com/) on a browser on a computer or mobile.\n\n### Video Demo:\n\nhttps://user-images.githubusercontent.com/99461390/171432484-b0d20930-92b8-4f02-bcb3-d773507a1ed9.mp4\n\nVideo is also on YouTube: https://youtu.be/E2-GN5ZVDKY\n\n## Screenshots\n\n### Screenshot: submitted Homepage\n\n![Screenshot: submitted Homepage](https://user-images.githubusercontent.com/99461390/171438307-e5865051-f739-4fd2-b2cd-1b5caa0095ef.jpg)\n\n### Screenshot: submitted Dashboard\n\n![Screenshot: submitted Dashboard](https://user-images.githubusercontent.com/99461390/171438325-6877551d-5875-4637-afe1-ac88fab85520.jpg)\n\n### Screenshot: submitted Login\n\n![Screenshot: submitted Login](https://user-images.githubusercontent.com/99461390/171438328-941e8bf3-d929-42d9-854b-82c66c726d18.jpg)\n\n## Installation for API testing in Insomnia\n\n### 0. Required\n\n| Programs   | Download links                             |\n| ---------- | ------------------------------------------ |\n| `Node`     | https://nodejs.org/en/download/            |\n| `Mysql`    | https://dev.mysql.com/downloads/installer/ |\n| `Insomnia` | https://insomnia.rest/download             |\n\n### 1. Git clone and go inside\n\n```sh\ngit clone https://github.com/leoelicos/submitted.git\n\ncd submitted\n```\n\n### 2. Rename `.env.EXAMPLE` to `.env`\n\n```sh\nmv .env.Example .env\n```\n\nInput your Mysql credentials. _Don't forget to save!_\n\n- `DB_USER={username}`\n- `DB_PASSWORD={password}`\n\n### 3. Go inside `db`, invoke `Mysql`, enter {password}, run `schema`\n\n```sh\ncd db\n\nmysql -u root -p\n\n{password}\n\nsource schema.sql;\n\nexit\n```\n\n### 4. Return to root, install dependencies, (optionally) run seed\n\n```sh\ncd ..\n\nnpm install\n\nnpm run seed\n\n```\n\n### 5. Start the server, then access the API with Insomnia\n\n```sh\nnpm start\n```\n\n## API\n\n### Base URL\n\nAll URLs start with `http://localhost:3001/api/`.\n\nNo API key is required. You will need to either log in, or sign up and be logged in, in order to receive the responses.\n\n---\n\n### Searching\n\nGET request to `/{type}` searches for items which have a specified type.\n\nPossible types include:\n\n- blogs: `blog`\n- categories: `category`\n- tags: `tag`\n- blog-tags links: `blogtag`\n- comments: `comment`\n- users: `user`\n\n**Example**:\n\n```sh\nGET http://localhost:3001/api/blog\n```\n\n---\n\n### Requesting a specific item\n\nGET request to `/{type}/{id}` searches for items which have a specified type and specified id.\n\nPossible types include:\n\n- a blog: `blog`\n- a blog category: `category`\n- a tag: `tag`\n- a blog-tag link: `blogtag`\n- a comment: `comment`\n- a user: `user`\n\n**Example**:\n\n```sh\nGET http://localhost:3001/api/blog/1\n```\n\n---\n\n### Adding a specific item\n\nPOST request to `/{type}/` adds an item of the specified type. You need to include a JSON with a valid body.\n\nPossible types and the JSON body:\n\n| `{type}`   | JSON                                                                                                 |\n| ---------- | ---------------------------------------------------------------------------------------------------- |\n| `blog`     | `{ \"title\": STRING, \"user_id\": INTEGER, \"category_id\": INTEGER, \"summary\": STRING, \"text\": STRING }` |\n| `blogtag`  | `{ \"blog_id\": INTEGER, \"tag_id\": INTEGER }`                                                          |\n| `category` | `{ \"category_name\": STRING }`                                                                        |\n| `comment`  | `{ \"text\": STRING, \"user_id\": INTEGER, \"blog_id\": INTEGER }`                                         |\n| `tag`      | `{ \"tag_name\": STRING }`                                                                             |\n| `user`     | `{ \"username\": STRING, \"password\": STRING }`                                                         |\n\n**Example**\n\n```sh\nPOST http://localhost:3001/api/tags/\n{ \"tag_name\": \"Express\" }\n```\n\n---\n\n### Editing a specific item\n\nPUT request to `/{type}/{id}` edits an item of the specified type. You need to include a JSON with a valid body.\n\nPossible types and the JSON body:\n\n| `{type}`   | JSON                                                                                                 |\n| ---------- | ---------------------------------------------------------------------------------------------------- |\n| `blog`     | `{ \"title\": STRING, \"user_id\": INTEGER, \"category_id\": INTEGER, \"summary\": STRING, \"text\": STRING }` |\n| `blogtag`  | `{ \"blog_id\": INTEGER, \"tag_id\": INTEGER }`                                                          |\n| `category` | `{ \"category_name\": STRING }`                                                                        |\n| `comment`  | `{ \"text\": STRING, \"user_id\": INTEGER, \"blog_id\": INTEGER }`                                         |\n| `tag`      | `{ \"tag_name\": STRING }`                                                                             |\n| `user`     | `{ \"username\": STRING, \"password\": STRING }`                                                         |\n\n**Example**\n\n```sh\nPUT http://localhost:3001/api/comment/1\n{ \"text\": \"Good advice!\", \"user_id\": 2, \"blog_id\": 1 }\n```\n\n---\n\n### Deleting a specific item\n\nDELETE request to `/{type}/{id}` deletes items which have a specified type and specified id.\n\nPossible types include:\n\n- a blog: `blog`\n- a blog category: `category`\n- a tag: `tag`\n- a blog-tag link: `blogtag`\n- a comment: `comment`\n- a user: `user`\n\n**Example**:\n\n```sh\nDELETE http://localhost:3001/api/category/1\n```\n\n---\n\n## Example of API response\n\nRequest:\n\n```sh\nGET http://localhost:3001/api/category\n```\n\nResponse:\n\n```json\n[\n  {\n    \"id\": 1,\n    \"category_name\": \"Homework\"\n  },\n  {\n    \"id\": 2,\n    \"category_name\": \"Challenges\"\n  },\n  {\n    \"id\": 3,\n    \"category_name\": \"Projects\"\n  },\n  {\n    \"id\": 4,\n    \"category_name\": \"Mini-projects\"\n  }\n]\n```\n\n## Credits\n\n- BCS Resources\n- [Normalize.css](https://necolas.github.io)\n\n## License\n\n\u0026copy; Leo Wong \u003cleoelicos@gmail.com\u003e\n\nLicensed under the [MIT License](./LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleoelicos%2Fsubmitted","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleoelicos%2Fsubmitted","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleoelicos%2Fsubmitted/lists"}