Skip to content

Sachin-kumar-jha/Blog-website

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Blog App

A full-stack blogging platform similar to Medium, allowing users to sign up, create blogs, view others' blogs, and manage their profiles.

Features

  • User Authentication: Sign up and Sign in functionality.
  • Create & Publish Blogs: Users can create and publish their own blogs.
  • View Blogs: Users can view blogs posted by others.
  • Delete Blogs: Authors can delete their own blogs (only if the blog's userId matches the authenticated user's id).
  • Profile Management: View user profiles to see published blogs.

Tech Stack

Frontend

  • Vite for fast development.
  • React with TypeScript for type-safe component development.

Backend

  • Hono for building lightweight and fast APIs.
  • PostgreSQL as the relational database.
  • Prisma ORM for database interaction.
  • Connection Pooling to optimize database connections and performance.

Project Setup

Backend Setup

  1. Install dependencies:
cd backend
npm install
  1. Set up environment variables in .env file:
DATABASE_URL="your_postgres_connection_url"
JWT_SECRET="your_jwt_secret"
  1. Add in your wrangler.jsonc file:
DATABASE_URL="your_postgres_connection-pool_url"
JWT_SECRET="your_jwt_secret"
  1. Run database migrations:
npx prisma migrate dev
  1. Start the backend server:
npm run dev

Frontend Setup

  1. Install dependencies:
cd frontend
npm install
  1. Start the development server:
npm run dev

Contributing

  1. Fork the repository.
  2. Create a new branch (git checkout -b feature-branch).
  3. Commit your changes (git commit -m 'Add new feature').
  4. Push to the branch (git push origin feature-branch).
  5. Open a pull request.

License

This project is licensed under the MIT License.


Feel free to contribute and enhance the platform!

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors