AkshitLakhera / PenCraft-Full-Stack-Blogging-Application

PenCraft: React frontend, Cloudflare Workers backend. Features Prisma for DB, JWT for auth, and Tailwind CSS with Aceternity UI components for styling. Simplifying blogging with efficiency.
https://pen-craft.vercel.app
MIT License
11 stars 14 forks source link
cloudflare cloudinary gssoc-ext hacktoberfest hacktoberfest-accepted honojs jwt-authentication prisma psotgresql react-hooks tailwind-css vercel web-crypto-api zod

PenCraft

This project aims to create a blogging platform using modern technologies for both frontend and backend. It utilizes a robust stack including React for the frontend, Cloudflare Workers for the backend, and a combination of other tools for validation, ORM, database, and authentication.

Technologies Used

Setup Instructions

Frontend

  1. Navigate to the frontend directory.
  2. Run npm install to install dependencies.
  3. Run npm start to start the development server.
  4. Access the development server at http://localhost:3000.

Backend

  1. Navigate to the backend directory.
  2. Run npm install to install dependencies.
  3. Set up your Postgres database and configure the connection in prisma/schema.prisma.
  4. Run npx prisma migrate dev to apply migrations and generate Prisma client.
  5. Run npm run dev to start the backend server.
  6. Access the backend server at http://localhost:8080.

Authentication (Cookies Approach)

For authentication, this project utilizes JSON Web Tokens (JWT) along with a cookies-based approach.

  1. Upon successful login, a JWT token is generated server-side and sent to the client.
  2. The JWT token is then stored in an HTTP-only cookie for enhanced security.
  3. Subsequent requests from the client include this token in the cookie header.
  4. The server validates the JWT token to authenticate the user for protected routes.

Additional Functionalities

Bookmark Functionality

Users can bookmark their favorite posts for quick access.

Search Functionality

Users can search for posts based on keywords or tags.

Delete Bookmark with Confirmation Model

Users can delete bookmarks with a confirmation model to prevent accidental deletion.

Image Upload Feature

Working on to supports image uploads, allowing users to enhance their blog posts with images. (Will add it after I get my credit card)

Add rich text editor

Added jodit editor .

Contributors

Feel free to contribute by forking and submitting pull requests!

Happy coding! 🚀