Skip to content

Opensource fullstack blogging app built using reactjs & serverless backend (cloudfare using honojs)

Notifications You must be signed in to change notification settings

RahulSingh9131/medium-app

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Blogging + AI

blogging app

A React frontend and Cloudflare workers backend application offering features that replicate Medium, the popular blogging platform.

Important links


🛠 Technologies & Libraries

📁 Project Structure

  • Backend: Contains server-side code and logic.
  • Common: Shared assets and modules used by frontend and backend. (NPM Library)
  • Frontend: Contains client-side code and logic.

💻 Local Setup

Backend

  • Navigate into the backend directory
cd backend
  • Create a copy of .env.example and name the file .env
  • Set up Postgres DATABASE_URL in .env file. You can get a free PostgreSQL connection string from Aiven.io.
  • Set up Prisma connection pool DATABASE_URL in wrangler.toml file. You can get this for free from Prisma.
  • Set up JWT Secret JWT_SECRET in wrangler.toml file. This can be any value.
  • Install dependencies using
npm install
  • Run the application locally using
npm run dev

Note: wrangler.toml is the environment configuration file for a serverless backend. .env is used by Prisma for connection pooling. Ensure you configure both environment files accordingly.

Frontend

  • Navigate into the frontend directory using
cd frontend
  • Install dependencies using
npm install
  • Run the application locally using
npm run dev

AI based Article content generation

  • set FF_ENABLE_AI = true in config.ts
  • set OPENAI_API_KEY in wrangler.toml file in the backend.
  • The feature is enabled only when title is atleast 10 characters long.

Docker-Setup

  • For this setup complete all the Frontend, Backend process including the Postgres, Prisma connection pool and JWT secret
  • Navigate to the root directory and run command docker-compose up -d, runs command in detached mode.
  • At last Navigate to the url http:https://localhost:80 for viewing the website.

Docker setup is not functional at the moment. An issue has been created for the same.


Contributing

We welcome contributions from the community! To contribute, follow these steps:

  1. Fork the repository.
  2. Create a new branch (git checkout -b feature/[feature-title]).
  3. Make your changes and commit them (git commit -am 'Add brief meaningful commit message').
  4. Push to the branch (git push origin feature/[feature-title]).
  5. Create a new Pull Request.

For major changes, please open an issue first to discuss what you would like to change.

Read our contribution guidelines for more details.

🤝 Contributors

About

Opensource fullstack blogging app built using reactjs & serverless backend (cloudfare using honojs)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 96.8%
  • CSS 1.1%
  • Other 2.1%