Skip to content

imsaravana369/ghost-note

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ghostnote: Honest Feedback, Anonymously.

Ghostnote Dashboard Screenshot Ghostnote Dashboard Screenshot2

Ghostnote is a modern, open-source platform designed to facilitate candid and anonymous feedback. It provides a secure space for individuals and teams to ask questions via shareable links and receive genuine responses without compromising the privacy of the person providing the feedback.


Core Features

  • Secure Google Authentication: Sign in with your Google account to manage your questions.
  • Shareable Links: Every question generates a unique, shareable link.
  • Anonymous by Default: Anyone with a link can provide feedback without logging in.
  • Optional Identity: Logged-in users can choose to attach their identity to their feedback.
  • Markdown Support: A rich text editor is provided for both questions and feedback.
  • Interactive Dashboard: A clean interface to view feedback on your questions, see a history of the feedback you've given, and refresh data in real-time.
  • Light & Dark Modes: A sleek, toggleable theme for a comfortable user experience.

Tech Stack

  • Backend: NestJS, TypeScript, Prisma, PostgreSQL
  • Frontend: React, TypeScript, Vite, Material UI
  • DevOps: Docker/Podman, Docker Compose for containerized environments.

Getting Started: First-Time Setup

These instructions will guide you through setting up the project for the first time.

Prerequisites

  • Git
  • Docker & Docker Compose, or Podman & podman-compose. The commands below use podman-compose but are compatible with docker-compose.

Installation

  1. Clone the Repository:

    git clone https://github.com/your-username/ghost-note.git
    cd ghost-note
  2. Configure the Backend (.env): This file is used for the local development environment.

    cp backend/.env.development.example backend/.env

    Now, open backend/.env and fill in your JWT_SECRET, GOOGLE_CLIENT_ID, and GOOGLE_CLIENT_SECRET. This configuration is pre-set to connect to the local Docker database.

  3. Configure the Frontend (.env.development):

    cp frontend/.env.example frontend/.env.development

    The default value VITE_APP_BASE_URL=http://localhost:5173 is correct for local development.


How to Run the Application

This project has two distinct environments: development (for coding, with hot-reloading) and production (for building optimized, final images).

Development Environment

The development environment uses hot-reloading for both the frontend and backend, allowing you to see code changes instantly without manual restarts.

  1. Build and Start Services: Use the -f flag to specify the development configuration file.

    podman-compose -f docker-compose.dev.yml up -d --build
  2. Run Database Migrations (First Time Only):

    podman-compose -f docker-compose.dev.yml exec backend npx prisma migrate dev
  3. Access the Application:

Production Environment

The production environment builds small, optimized, and secure images ready for deployment.

  1. Configure Production Environment (.env.prod): Create a production environment file. Remember to use different, more secure secrets for production.

    cp backend/.env.example backend/.env.prod

    Open backend/.env.prod and update the database credentials, JWT secret, and Google OAuth credentials for your production setup. Also, update FRONTEND_URL to your production domain (e.g., https://ghostnote.app).

  2. Build and Start Services: This command uses the main docker-compose.yml file by default.

    podman-compose up -d --build
  3. Run Database Migrations:

    podman-compose exec backend npx prisma migrate deploy
  4. Access the Application:


Common Commands

Task Development Command Production Command
Start Services podman-compose -f docker-compose.dev.yml up -d podman-compose up -d
Stop Services podman-compose -f docker-compose.dev.yml down podman-compose down
View Logs podman-compose -f docker-compose.dev.yml logs -f podman-compose logs -f
Restart a Service podman-compose -f docker-compose.dev.yml restart <name> podman-compose restart <name>
Apply Config Changes podman-compose -f docker-compose.dev.yml up -d --force-recreate podman-compose up -d --force-recreate
Get a Shell Inside Backend podman-compose -f docker-compose.dev.yml exec backend sh podman-compose exec backend sh
Access Prisma Studio podman-compose -f docker-compose.dev.yml exec backend npx prisma studio podman-compose exec backend npx prisma studio

(Replace <name> with frontend, backend, or db)

About

A place where you can get honest & anonymous feedback

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors