Skip to content

Latest commit

Β 

History

History
63 lines (59 loc) Β· 1.66 KB

File metadata and controls

63 lines (59 loc) Β· 1.66 KB

Postify

A simple social media-style web app built with Node.js, Express, MongoDB, and EJS. Users can register, log in, create posts, like/unlike posts, and edit their content.

πŸš€ Features

  • User Authentication – Secure login/register with JWT and bcrypt
  • Profile Page – View your posts and likes
  • Like/Unlike System – Toggle likes on posts
  • Edit Posts – Update your post content anytime
  • Secure Routes – Only logged-in users can post or like
  • EJS Templates – Server-side rendered views
  • MongoDB Database – Store users and posts

πŸ›  Tech Stack

  • Backend: Node.js, Express.js
  • Database: MongoDB, Mongoose
  • Authentication: JWT, bcrypt.js, cookie-parser
  • Templating: EJS
  • Styling: CSS, Public Assets
  • Other: Path, dotenv

πŸ“‚ Project Structure

. β”œβ”€β”€ models β”‚ β”œβ”€β”€ user.js β”‚ └── post.js β”œβ”€β”€ public β”‚ β”œβ”€β”€ css/ β”‚ └── js/ β”œβ”€β”€ views β”‚ β”œβ”€β”€ index.ejs β”‚ β”œβ”€β”€ profile.ejs β”‚ β”œβ”€β”€ login.ejs β”‚ └── edit.ejs β”œβ”€β”€ app.js └── package.json

βš™οΈ Installation & Setup

  1. Clone the repository
    git clone https://github.com/yourusername/postify.git
    cd postify
  2. Install dependencies
    npm install
  3. Setup environment variables Create a .env file in the root directory:
    MONGODB_URI=your_mongodb_connection_string
    JWT_SECRET=shhhhhhh
    PORT=3000
  4. Run the app
    node app.js
    Or with nodemon:
    npx nodemon app.js
  5. Open in browser Visit http://localhost:3000