Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/solygambas/javascript-blogging-platform
A blogging platform using MongoDB Atlas, Express and Node.js.
https://github.com/solygambas/javascript-blogging-platform
ejs express expressjs javascript mongodb node nodejs socket-io
Last synced: 23 days ago
JSON representation
A blogging platform using MongoDB Atlas, Express and Node.js.
- Host: GitHub
- URL: https://github.com/solygambas/javascript-blogging-platform
- Owner: solygambas
- Created: 2020-04-11T10:42:03.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-03-04T11:34:54.000Z (almost 2 years ago)
- Last Synced: 2024-10-27T22:31:26.399Z (2 months ago)
- Topics: ejs, express, expressjs, javascript, mongodb, node, nodejs, socket-io
- Language: JavaScript
- Homepage: https://javascript-blogging-platform.onrender.com/
- Size: 1.85 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 26
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Blogging Platform
A blogging platform using MongoDB Atlas, Express and Node.js.
## Demo
[See Demo deployed on Render](https://javascript-blogging-platform.onrender.com/)
## Core features
- using Model–View–Controller (MVC) design pattern.
- handling routes with Express.
- handling views with Embedded JavaScript templates (EJS).
- validating user data with validator.
- adding registered users to MongoDB Atlas and hashing passwords with bcryptjs.
- using promises and async/await method.
- managing connected users with express-session.
- storing sessions with connect-mongo.
- displaying error/success messages with connect-flash.
- displaying profile picture with Gravatar and generating image urls with md5.
- performing CRUD operations (create, read, update, delete) using MongoDB Atlas for posts.
- displaying profile with the latest posts published by author.
- handling markdown in posts with marked.
- sending email notifications with Sendgrid API.
- sanitizing data posted by users with sanitize-html.
- preventing Cross-Site Request Forgery (CSRF) with csurf.## Live Search Feature
- bundling front-end JavaScript with Webpack and Babel.
- handling key press events with setTimeout().
- sending search requests to the server with Axios.
- creating an index in MongoDB Atlas and building a search request to the database.
- sanitizing results with DOMPurify.## Follow Feature
- handling follow and unfollow features on author profile.
- storing followed users in the database.
- retrieving followers and followed users from the database.
- counting posts, followers and followed users with await Promise.all() and countDocuments().
- displaying a feed on the dashboard with the latest posts published by followed users.## Live Chat
- handling realtime communication between web clients and server with Socket.IO.
- sending messages with emit() and waiting for messages with on().
- broadcasting messages with socket.broadcast.emit().
- displaying usernames and avatars in the live chat with express-session.
- sanitizing messages with sanitize-html (server-side) and DOMPurify (client-side).## Live Validation
- displaying errors on the fly for registration form with regex.
- checking if username and email are already in the database with Axios.
- performing a last check before submitting the form.## API
- granting access to the API with JSON Web Tokens (/api/login).
- enabling routes for creating (/api/create-post) and deleting posts (/api/post/:id) through the API.
- enabling public GET requests to retrieve posts by author (/api/posts-by-author/:username).
- handling Cross-origin resource sharing (CORS).## Render
- deploying on Render.
Based on [Learn JavaScript: Full-Stack from Scratch](https://www.udemy.com/course/learn-javascript-full-stack-from-scratch/) by Brad Schiff (2019).