{"id":18255935,"url":"https://github.com/nothingnothings/postmanager-backend","last_synced_at":"2026-04-10T00:03:49.236Z","repository":{"id":150002833,"uuid":"536265293","full_name":"nothingnothings/PostManager-Backend","owner":"nothingnothings","description":"The backend of the Post Manager project.  Essentially a Node.js REST API backend with authentication and post creation logic, connected to a ReactJS frontend and deployed on the Railway platform.","archived":false,"fork":false,"pushed_at":"2024-10-04T17:19:15.000Z","size":519,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-08T22:29:37.240Z","etag":null,"topics":["backend","express-validator","expressjs","javascript","jsonwebtoken","mern","mongodb","mongoose","multer","nodejs","railway","react","rest","restapi","serverside","single-page-application"],"latest_commit_sha":null,"homepage":"https://nothingnothings.github.io/PostManager/","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/nothingnothings.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-09-13T18:45:02.000Z","updated_at":"2024-10-04T17:19:19.000Z","dependencies_parsed_at":"2024-11-05T10:35:11.750Z","dependency_job_id":null,"html_url":"https://github.com/nothingnothings/PostManager-Backend","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/nothingnothings/PostManager-Backend","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nothingnothings%2FPostManager-Backend","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nothingnothings%2FPostManager-Backend/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nothingnothings%2FPostManager-Backend/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nothingnothings%2FPostManager-Backend/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nothingnothings","download_url":"https://codeload.github.com/nothingnothings/PostManager-Backend/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nothingnothings%2FPostManager-Backend/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260008981,"owners_count":22945389,"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","express-validator","expressjs","javascript","jsonwebtoken","mern","mongodb","mongoose","multer","nodejs","railway","react","rest","restapi","serverside","single-page-application"],"created_at":"2024-11-05T10:19:07.084Z","updated_at":"2025-12-30T19:57:44.596Z","avatar_url":"https://github.com/nothingnothings.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PostManager - Backend\n\nThe backend of the [Post Manager](https://github.com/nothingnothings/PostManager) project.\n\nEssentially a Node.js REST API backend with authentication and post creation logic, connected to a ReactJS frontend and deployed on the Railway platform.\n\n![CodeFactor Grade](https://img.shields.io/codefactor/grade/github/nothingnothings/PostManager-Backend/master?style=flat-square)\n[![en](https://img.shields.io/badge/lang-en-red.svg?style=flat-square)](https://github.com/nothingnothings/PostManager-Backend)\n[![pt-br](https://img.shields.io/badge/lang-pt--br-green.svg?style=flat-square)](https://github.com/nothingnothings/PostManager-Backend/blob/master/README.pt-br.md)\n\n\n\n## Technologies\n\nSome of the Languages, Libraries and Packages employed on this backend:\n\n- Node\n- Express.js (middleware-based Node.js framework; used for an enhanced backend endpoint setup)\n- Node Package Manager (for bootstrapping and managing the Node.js app)\n- MongoDB (noSQL database storage solution; storage of `user` and `post` objects into collections in a remote MongoDB Atlas database)\n- `body-parser` (needed for the parsing of the JSON data sent by the frontend)\n- `express-validator` (validation of inputted user data, on the backend, with methods such as \"isEmpty()\" and \"isLength()\")\n- `bcryptjs` (used for storing encrypted passwords inside of `user` documents on MongoDB database)\n- `multer` - used for receiving product image files, on the \"Add a Product\" endpoint (disabled on this demo version of the app)\n- `jsonwebtoken` (for the generation of JSON Web Tokens, which are then stored on the local storage of the user's browser and then checked for authentication)\n\n\n## Project Directory Structure\n\nThe REST API backend's directory structure:\n\n```\n.\\\n│\n├── config\\\n│   ├── dev.js\n│   ├── keys.js\n│   └── prod.js\n│\n├── controllers\\\n│   ├── auth.js\n│   └── feed.js\n│\n├── images\\\n│   ├── 504c296d-482d-4d6a-8821-9991b3ea47c6-0c64c92d97cf2c5f4ce1be7b81537d55.png\n│   ├── 90fd0c3b-533d-4a9a-92c4-ab5af0cb6f6f-nodejs_original_wordmark_logo_icon_146412.png\n│   ├── 9409c72d-3fb3-43e3-b499-396752769a5e-Unofficial_JavaScript_logo_2.svg.png\n│   ├── aec4a1bc-c807-4b12-8772-dd7d7e4cf309-mongodb_original_wordmark_logo_icon_146425.png\n│   ├── ca6cceac-4648-457b-9306-273b22427567-Unofficial_JavaScript_logo_2.svg.png\n│   ├── d3ff5457-17c2-4b71-895e-4802b63cdd7a-logo-og.png\n│   ├── d980ff73-f1da-488b-bc21-42efffcfa220-0c64c92d97cf2c5f4ce1be7b81537d55.png\n│   ├── e17bbaa2-ef31-4d34-ab98-949ffafc7594-Unofficial_JavaScript_logo_2.svg.png\n│   ├── eb3f5305-bd34-43e5-baa6-374b19358510-mobile-first-.jpg\n│   └── f2036847-ce43-4135-8519-4c5b3d4030c1-Unofficial_JavaScript_logo_2.svg.png\n│\n├── middlewareHelpers\\\n│   └── is-auth.js\n│\n├── models\\\n│   ├── post.js\n│   └── user.js\n│\n├── routes\\\n│   ├── auth.js\n│   └── feed.js\n│\n├── .gitignore\n├── app.js\n├── package-lock.json\n└── package.json\n```\n\n## Project Configuration Files (package.json)\n\nThe package.json file used in the project:\n\n```\n{\n  \"name\": \"nodeexpressbackend\",\n  \"version\": \"1.0.0\",\n  \"description\": \"\",\n  \"main\": \"index.js\",\n  \"scripts\": {\n    \"test\": \"echo \\\"Error: no test specified\\\" \u0026\u0026 exit 1\",\n    \"start\": \"node app.js\"\n  },\n  \"author\": \"\",\n  \"license\": \"ISC\",\n  \"dependencies\": {\n    \"bcryptjs\": \"^2.4.3\",\n    \"body-parser\": \"^1.19.0\",\n    \"express\": \"^4.17.1\",\n    \"express-validator\": \"^6.13.0\",\n    \"jsonwebtoken\": \"^8.5.1\",\n    \"mongodb\": \"^4.2.0\",\n    \"mongoose\": \"^6.0.13\",\n    \"multer\": \"^1.4.3\",\n    \"uuid\": \"^8.3.2\"\n  }\n}\n\n\n```\n\n## Setup\n\nTo use this project, clone it using Git:\n\n1. Run `git clone` to clone the project into your local Git repository\n2. Run `npm install` to install all dependencies (`express`, `bcryptjs`, `mongodb`, etc)\n3. Run `npm start` to spin up the the app\n4. Use the server locally or deploy it on the web, with the help of a hosting provider (e.g. Railway)\n5. For the purposes of this demo, on the \"Get Started\" (Authentication) page, input the credentials `exemplo@exemplo.com` (email) and `exemplo` (password) to access the apps's various features\n\n## Features\n\n- Connected to a Single-Page Application ( no page reloads, REST API); serving of a single HTML file (index.html file, \"skeleton\" for the ReactJS components)\n- Serverside form input validation logic, powered by `express-validator`\n- Simple pagination logic for the list of posts (\"Next\" and \"Previous\" buttons)\n- For deployment demonstration purposes, only a single user is enabled/created on the serverside, with the credentials exemplo@exemplo.com (email field) and exemplo (password field). Furthermore, the \"Posts\" made by the user are reset every 1 Hour (MongoDB \"Scheduled Trigger\" feature)\n- Backend uses and manages the \"User\" and \"Post\" objects, which are stored on a MongoDB database (MongoDB Atlas service); the Node.js server and MongoDB database also handle the authentication logic (login/signup) implemented on the app\n- Usage of environment variables with Railway to hide sensitive information (API_KEYS, Json Web Token secrets, database usernames and passwords, etc.)\n\n## Inspiration\n\nInspired by the \"NodeJS - The Complete Guide (MVC, REST APIs, GraphQL, Deno)\" and \"React - The Complete Guide (incl Hooks, React Router, Redux)\" courses by Maximilian Schwarzmüller.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnothingnothings%2Fpostmanager-backend","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnothingnothings%2Fpostmanager-backend","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnothingnothings%2Fpostmanager-backend/lists"}