{"id":18615020,"url":"https://github.com/andrewjbateman/fcc-message-board","last_synced_at":"2026-04-13T06:05:14.656Z","repository":{"id":43504633,"uuid":"154387243","full_name":"AndrewJBateman/fcc-message-board","owner":"AndrewJBateman","description":":clipboard: FCC project to post, get and delete messages using node.js and express + mongoDB","archived":false,"fork":false,"pushed_at":"2023-01-24T03:26:51.000Z","size":866,"stargazers_count":0,"open_issues_count":12,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-12-27T02:45:18.619Z","etag":null,"topics":["backend","crud-application","express","information-security","javascript","mongodb","mongoose","nodejs"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/AndrewJBateman.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":"2018-10-23T19:45:16.000Z","updated_at":"2021-06-13T16:58:53.000Z","dependencies_parsed_at":"2023-01-31T17:01:35.219Z","dependency_job_id":null,"html_url":"https://github.com/AndrewJBateman/fcc-message-board","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/AndrewJBateman%2Ffcc-message-board","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndrewJBateman%2Ffcc-message-board/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndrewJBateman%2Ffcc-message-board/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndrewJBateman%2Ffcc-message-board/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AndrewJBateman","download_url":"https://codeload.github.com/AndrewJBateman/fcc-message-board/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239406450,"owners_count":19633024,"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":["backend","crud-application","express","information-security","javascript","mongodb","mongoose","nodejs"],"created_at":"2024-11-07T03:27:50.886Z","updated_at":"2025-11-03T03:30:33.002Z","avatar_url":"https://github.com/AndrewJBateman.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# :zap: FCC Anon Message Board\n\n* Free Code Camp project to post, get and delete messages using Node.js and express + mongoDB\n* **Note:** to open web links in a new window use: _ctrl+click on link_\n\n![GitHub repo size](https://img.shields.io/github/repo-size/AndrewJBateman/fcc-message-board?style=plastic)\n![GitHub pull requests](https://img.shields.io/github/issues-pr/AndrewJBateman/fcc-message-board?style=plastic)\n![GitHub Repo stars](https://img.shields.io/github/stars/AndrewJBateman/fcc-message-board?style=plastic)\n![GitHub last commit](https://img.shields.io/github/last-commit/AndrewJBateman/fcc-message-board?style=plastic)\n\n## :page_facing_up: Table of contents\n\n* [:zap: FCC Anon Message Board](#zap-fcc-anon-message-board)\n  * [:page_facing_up: Table of contents](#page_facing_up-table-of-contents)\n  * [:books: General info](#books-general-info)\n  * [:camera: Screenshots](#camera-screenshots)\n  * [:signal_strength: Technologies](#signal_strength-technologies)\n  * [:floppy_disk: Setup](#floppy_disk-setup)\n  * [:computer: Code Examples](#computer-code-examples)\n  * [:cool: Features - FCC Requirements](#cool-features---fcc-requirements)\n  * [:clipboard: Status \u0026 To-Do List](#clipboard-status--to-do-list)\n  * [:clap: Inspiration](#clap-inspiration)\n  * [:envelope: Contact](#envelope-contact)\n\n## :books: General info\n\n* Code had to be functionally similar to [this](https://horn-celery.glitch.me/).\n* SET NODE_ENV to `test` without quotes when ready to write tests and DB to your databases connection string (in .env)\n* Recomended to create controllers/handlers and handle routing in routes/api.js\n* You will add any security features to `server.js`\n* You will create all of the functional/unit tests in `tests/2_functional-tests.js` and `tests/1_unit-tests.js` but only functional will be tested\n\n## :camera: Screenshots\n\n![Example screenshot](./img/screen.png).\n\n## :signal_strength: Technologies\n\n* [Express.js v4](https://expressjs.com/) web framework for Node.js\n* [Cors v2](https://www.npmjs.com/package/cors) node.js package to enable Cross Origin Resource Sharing (CORS)\n* [Body-parser v1](https://www.npmjs.com/package/body-parser) node.js parsing middleware\n* [Chai v4](https://www.chaijs.com/) assertion library for node\n* [MongoDB v3](https://www.mongodb.com/)\n* [Chai-http v4](https://www.chaijs.com/plugins/chai-http/) http integration testing with Chai assertions.\n* [Mocha v8](https://mochajs.org/) javascript test framework that runs on Node.js\n* [Zombie v6](https://www.npmjs.com/package/zombie) headless full-stack testing\n* [Helmet v3](https://www.npmjs.com/package/helmet) to set HTTP headers\n* [Mongoose v5](https://mongoosejs.com/) mongodb object modelling for node.js\n\n## :floppy_disk: Setup\n\n* Add .env file with MongoDB database DB, PORT for file `api.js`\n* run `nom start` for a dev server\n* View in [Glitch](https://anon-message-board.glitch.me/).\n\n## :computer: Code Examples\n\n* function to show board data (minus reported and delete_password fields, with latest 3 replies)\n\n```javascript\n  const showAll = (board, res) =\u003e {\n    board.find({}, {reported: 0, delete_password: 0, replies: {$slice: -3} })\n      .sort({bumped_on: -1}) //sort by most recent first\n      .limit( 10 ) //limit no of results to 10\n      .exec((err, data) =\u003e {\n        if (err) return res.send(err.message)\n        res.json(data)\n      })\n  }\n```\n\n## :cool: Features - FCC Requirements\n\n* Only allow your site to be loading in an iFrame on your own pages.\n* Do not allow DNS prefetching.\n* Only allow your site to send the referrer for your own pages.\n* I can POST a thread to a specific message board by passing form data text and deletepassword**_ to /api/threads/{board}.(Recommend res.redirect to board page /b/{board}) Saved will be at least _**id, text, createdon_(date\u0026time), bumpedon_(date\u0026time, starts same as created_on), reported(boolean), deletepassword_, \u0026 replies(array).\n* I can POST a reply to a thread on a specific board by passing form data text, deletepassword_, \u0026 threadid_ to /api/replies/{board} and it will also update the bumped_on date to the comments date.(Recommend res.redirect to thread page /b/{board}/{thread_id}) In the thread's replies array will be saved _id, text, createdon_, deletepassword_, \u0026 reported.\n* I can GET an array of the most recent 10 bumped threads on the board with only the most recent 3 replies each from /api/threads/{board}. The reported and deletepasswords_ fields will not be sent to the client.\n* I can GET an entire thread with all its replies from /api/replies/{board}?thread_id={thread_id}. Also hiding the same fields the client should be see.\n* I can delete a thread completely if I send a DELETE request to /api/threads/{board} and pass along the threadid**_ \u0026 deletepassword_**. (Text response will be 'incorrect password' or 'success')\n* I can delete a post(just changing the text to '[deleted]' instead of removing completely like a thread) if I send a DELETE request to /api/replies/{board} and pass along the threadid_, replyid_, \u0026 deletepassword_. (Text response will be 'incorrect password' or 'success')\n* I can report a thread and change its reported value to true by sending a PUT request to /api/threads/{board} and pass along the threadid_. (Text response will be 'success')\n* I can report a reply and change its reported value to true by sending a PUT request to /api/replies/{board} and pass along the threadid**_ \u0026 replyid_**. (Text response will be 'success')\n* Complete functional tests that wholly test routes and pass.\n\n## :clipboard: Status \u0026 To-Do List\n\n* Status: Working.\n* To-Do: complete documentation of code.\n\n## :clap: Inspiration\n\n* FreeCodeCamp: [Information Security and Quality Assurance Projects - Anonymous Message Board](https://www.freecodecamp.org/learn/information-security-and-quality-assurance/information-security-and-quality-assurance-projects/anonymous-message-board).\n* [TutorialsPoint article: ExpressJS - Middleware](https://www.tutorialspoint.com/expressjs/expressjs_middleware.htm)\n\n## :file_folder: License\n\n* This project is licensed under the terms of the MIT license.\n\n## :envelope: Contact\n\n* Repo created by [ABateman](https://github.com/AndrewJBateman), email: gomezbateman@yahoo.com\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrewjbateman%2Ffcc-message-board","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandrewjbateman%2Ffcc-message-board","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrewjbateman%2Ffcc-message-board/lists"}