vishal-kumar3 / WriteFlow

https://write-flow-app.vercel.app/
5 stars 4 forks source link
hacktoberfest hacktoberfest-accepted nestjs nextauth postgresql prisma serveraction shadcn-ui tailwindcss zod

Write Flow App Documentation

Table of Contents

Introduction

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.

Prerequisites

Before you start, ensure you have the following installed:

Installation

Install Bun

Linux

    curl -fsSL https://bun.sh/install | bash

Windows

    powershell -c "irm bun.sh/install.ps1 | iex"

Using Docker

  1. Clone the repository:

    git clone https://github.com/vishal-kumar3/WriteFlow.git
    cd WriteFlow
  2. 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.

Using Your Own Postgres Server

  1. Clone the repository:

    git clone https://github.com/vishal-kumar3/WriteFlow.git
    cd WriteFlow
  2. Install the necessary dependencies:

    bun install
  3. 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.
  4. 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=
  5. Run the application:

    bun run dev

    The application will be accessible at http://localhost:3000.

Running the Application

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.

Environment Variables

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=

Explanation of Variables:

Tech Stack

The Write Flow app utilizes the following technologies and libraries:

Frontend:

Backend:

Others:

Features

Contributing

Contributions are welcome! Please follow these steps:

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

License

This project is licensed under the MIT License - see the LICENSE file for details.