- Introduction
- Prerequisites
- Installation
- Running the Application
- Environment Variables
- Tech Stack
- Features
- Contributing
- License
Write Flow is a web application designed to streamline the process of writing and organizing content. It provides a user-friendly interface and a powerful backend for managing posts and user interactions.
Before you start, ensure you have the following installed:
- Node.js (v20 or higher)
- Docker
curl -fsSL https://bun.sh/install | bash
powershell -c "irm bun.sh/install.ps1 | iex"
-
Clone the repository:
git clone https://github.com/vishal-kumar3/WriteFlow.git cd WriteFlow
-
Build and run the application using Docker:
docker run --name postgres -e POSTGRES_DB=writeflow -e POSTGRES_USER=postgres -e POSTGRES_PASSWORD=12345 -p 5432:5432 -d postgres bunx prisma migrate deploy bun run dev
The application will be accessible at http://localhost:3000, and the Postgres database will be running in the background.
-
Clone the repository:
git clone https://github.com/vishal-kumar3/WriteFlow.git cd WriteFlow
-
Install the necessary dependencies:
bun install
-
Set up your Postgres database:
- Create a database named
writeflow
. - Create a user (if necessary) to access the database.
- Then run
bunx prisma migrate deploy
to migrate all the tables.
- Create a database named
-
Update your
.env
file with the database connection details:AUTH_TRUST_HOST=http://localhost:3000 NEXT_PUBLIC_HOST=http://localhost:3000 DATABASE_URL=postgresql://<username>:<password>@<host>:<port>/<database> AUTH_SECRET=secret GOOGLE_CLIENT_ID= GOOGLE_CLIENT_SECRET=
-
Run the application:
bun run dev
The application will be accessible at http://localhost:3000.
After following either the Docker or Postgres setup instructions, the application should be up and running. You can access the application by navigating to http://localhost:3000 in your web browser.
Ensure you set the following environment variables in your .env
file:
AUTH_TRUST_HOST=http://localhost:3000
NEXT_PUBLIC_HOST=http://localhost:3000
DATABASE_URL=postgresql://postgres:12345@localhost:5432/writeflow
AUTH_SECRET=secret
GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=
- AUTH_TRUST_HOST: The host URL for authorization.
- NEXT_PUBLIC_HOST: The public host URL for your application.
- DATABASE_URL: The connection string for your Postgres database.
- AUTH_SECRET: A secret key for authentication.
- GOOGLE_CLIENT_ID: Your Google OAuth client ID.
- GOOGLE_CLIENT_SECRET: Your Google OAuth client secret.
The Write Flow app utilizes the following technologies and libraries:
- Next.js - A React framework for building server-rendered applications.
- React - A JavaScript library for building user interfaces.
- Tailwind CSS - A utility-first CSS framework for styling.
- Shadcn UI - A library for building accessible UI components.
- Tiptap - A headless WYSIWYG editor for rich text editing.
- Node.js - JavaScript runtime built on Chrome's V8 engine.
- Prisma - An ORM for Node.js and TypeScript that simplifies database access.
- PostgreSQL - A powerful open-source relational database.
- NextAuth - A complete open-source authentication solution for Next.js.
- Uploadcare - A file uploading and management service.
- User authentication with Google OAuth.
- Create, edit, and delete posts.
- Organize content efficiently.
- Rich text editor for formatting posts.
- Responsive design for mobile and desktop users.
Contributions are welcome! Please follow these steps:
- Fork the repository.
- Create a new branch (
git checkout -b feature/YourFeature
). - Make your changes.
- Commit your changes (
git commit -m 'Add some feature'
). - Push to the branch (
git push origin feature/YourFeature
). - Create a pull request.
This project is licensed under the MIT License - see the LICENSE file for details.