Blogosphere is a dynamic, user-friendly blogging platform that empowers writers to create, manage, and share their content effortlessly. Built with responsiveness in mind, it offers a seamless experience across devices.
- 📝 Create and edit blog posts
- 🖼️ Upload custom header images via Cloudinary integration
- 📋 Save drafts for future publishing
- 🗑️ Manage and delete your own content
- 👤 User account management, including account deletion
- 📱 Responsive design for optimal viewing on all devices
- Clone the repository
git clone https://github.com/Thanisha23/Blogosphere.git
- Navigate to the project directory and install dependencies for the backend
cd backend
pnpm install
- Create a file named
.env
in the root directory of backend and add the following environment variables(Get DATABASE_URL from any postgreSQL DB Provider )
DATABASE_URL="postgresql://user:password@localhost:5432/mydatabase"
FRONTEND_URL="http://localhost:5173"
- If you don't have a
wrangler.toml
file, create one in the root directory of your project. Here's an example configuration:
name = "your-project-name"
compatibility_date = "2023-12-01"
[vars]
DATABASE_URL="your-connection-pool-url(from prisma accelerate)"
ALLOWED_ORIGIN = "http://localhost:5173"
JWT_SECRET = "your_jwt_secret"
FRONTEND_URL = "http://localhost:5173"
# [[kv_namespaces]]
# binding = "MY_KV_NAMESPACE"
# id = "your-kv-namespace-id"
- Set Up Prisma
1.Apply migrations to your database
2.Generate the prisma client
pnpx prisma migrate dev --name init_schema
pnpx prisma generate --no-engine
- Start the Development Server
pnpm run dev
- In a new terminal, navigate to the frontend directory and install the dependencies
cd frontend
pnpm install
- Create a file named
.env
in the root directory add the following environment variables
VITE_BACKEND_URL = "YOUR_BACKEND_URL"
VITE_CLOUDINARY_URL = "YOUR_CLOUDINARY_URL"
VITE_CLOUD_NAME = "YOUR_CLOUD_NAME"
- Start the frontend development server
pnpm run dev