Skip to content

romizone/noteflow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

15 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

NoteFlow Logo

NoteFlow

Your Notes, Tasks & Ideas β€” All in One Place

A modern, full-featured note-taking web application inspired by Evernote.
Built with Next.js 16 Β· Neon PostgreSQL Β· Google OAuth Β· Vercel

Version Next.js Neon Vercel License

Features β€’ Tech Stack β€’ Getting Started β€’ Deployment β€’ Structure β€’ Contributing


πŸ“Έ Overview

NoteFlow brings the power of professional note-taking to the web. Organize your thoughts with rich-text notes, manage tasks with due dates, categorize with notebooks and tags, and search instantly β€” all behind secure Google authentication.


✨ Features

πŸ“ Rich Text Editor

Feature Description
πŸ”€ Text Formatting Bold, Italic, Underline, Strikethrough, Highlight
πŸ“ Headings H1, H2, H3 support
πŸ“‹ Lists Bullet, Numbered, and Task/Checkbox lists
πŸ’» Code Blocks Syntax-highlighted code snippets
πŸ’¬ Blockquotes Styled quote blocks
πŸ”— Links Insert and edit hyperlinks
πŸ“ Alignment Left, Center, Right text alignment
↩️ Undo/Redo Full history support

πŸ“’ Notes Management

Feature Description
πŸ“Œ Pin Notes Keep important notes at the top
⭐ Favorites Mark notes as favorites for quick access
πŸ—‚οΈ Notebooks Organize notes into color-coded notebooks
🏷️ Tags Flexible tagging system with multi-tag support
πŸ” Search Full-text search across titles and content
πŸ—‘οΈ Trash Soft delete with restore and permanent delete

βœ… Tasks

Feature Description
βž• Create Tasks Standalone task management
πŸ“… Due Dates Set deadlines for your tasks
βœ”οΈ Completion Toggle complete/incomplete status

πŸ“‹ Scratch Pad

Feature Description
✏️ Quick Notes Instant note area on the home dashboard
πŸ’Ύ Auto-Save Saves automatically as you type

πŸ” Authentication & Security

Feature Description
πŸ”‘ Google OAuth Secure sign-in with Google account
πŸ›‘οΈ Session Management Server-side sessions via NextAuth.js
πŸ”’ Data Isolation Each user can only access their own data

πŸ“± Responsive Design

Feature Description
πŸ–₯️ Desktop Full sidebar with all navigation
πŸ“± Mobile Collapsible hamburger menu sidebar

πŸ› οΈ Tech Stack


Framework

Language

Styling

Database

DB Provider

ORM

Auth

Deployment

Editor

Icons

Dates

Linting

πŸš€ Getting Started

Prerequisites

Requirement Purpose
πŸ“¦ Node.js 18+ Runtime environment
πŸ—„οΈ Neon account PostgreSQL database
πŸ”‘ Google Cloud project OAuth authentication
β–² Vercel account Deployment (optional)

1️⃣ Clone the Repository

git clone https://github.com/romizone/noteflow.git
cd noteflow
npm install

2️⃣ Configure Environment Variables

cp .env.example .env.local

Edit .env.local with your credentials:

# πŸ—„οΈ Neon Database
DATABASE_URL=postgresql://user:password@ep-xxx.region.aws.neon.tech/neondb?sslmode=require

# πŸ”‘ Google OAuth
GOOGLE_CLIENT_ID=your_google_client_id
GOOGLE_CLIENT_SECRET=your_google_client_secret

# πŸ” NextAuth
NEXTAUTH_URL=http://localhost:3000
NEXTAUTH_SECRET=generate_with_openssl_rand_base64_32

3️⃣ Set Up Google OAuth

  1. Go to Google Cloud Console
  2. Create or select a project
  3. Navigate to APIs & Services > Credentials
  4. Click Create Credentials > OAuth 2.0 Client ID
  5. Select Web application
  6. Add Authorized redirect URIs:
    • http://localhost:3000/api/auth/callback/google (development)
    • https://your-app.vercel.app/api/auth/callback/google (production)
  7. Copy the Client ID and Client Secret to .env.local

4️⃣ Push Database Schema

npm run db:push

5️⃣ Start Development Server

npm run dev

🌐 Open http://localhost:3000 in your browser.


☁️ Deployment

Deploy to Vercel

  1. Push your repository to GitHub
  2. Visit vercel.com/new and import your repo
  3. Configure the following Environment Variables:
Variable Value Description
DATABASE_URL postgresql://... Neon connection string
GOOGLE_CLIENT_ID xxx.apps.googleusercontent.com Google OAuth Client ID
GOOGLE_CLIENT_SECRET GOCSPX-xxx Google OAuth Client Secret
NEXTAUTH_URL https://your-app.vercel.app Production URL
NEXTAUTH_SECRET (generated) Run openssl rand -base64 32
  1. Click Deploy πŸš€

πŸ—ƒοΈ Database Commands

Command Description
npm run db:push πŸ“€ Push schema changes to Neon
npm run db:generate πŸ“„ Generate migration files
npm run db:migrate ▢️ Run pending migrations
npm run db:studio πŸ–₯️ Open Drizzle Studio (database GUI)

πŸ“ Project Structure

noteflow/
β”œβ”€β”€ πŸ“‚ src/
β”‚   β”œβ”€β”€ πŸ“‚ app/
β”‚   β”‚   β”œβ”€β”€ πŸ“‚ api/
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“‚ auth/[...nextauth]/   # πŸ”‘ NextAuth API
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“‚ notes/                # πŸ“ Notes CRUD
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“‚ notebooks/            # πŸ“’ Notebooks CRUD
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“‚ tags/                 # 🏷️ Tags CRUD
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“‚ tasks/                # βœ… Tasks CRUD
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“‚ scratch-pad/          # πŸ“‹ Scratch Pad
β”‚   β”‚   β”‚   └── πŸ“‚ search/               # πŸ” Search API
β”‚   β”‚   β”œβ”€β”€ πŸ“‚ login/                    # πŸ” Login page
β”‚   β”‚   β”œβ”€β”€ πŸ“‚ notes/[id]/               # ✏️ Note editor
β”‚   β”‚   β”œβ”€β”€ πŸ“‚ notebooks/                # πŸ“’ Notebooks pages
β”‚   β”‚   β”œβ”€β”€ πŸ“‚ tags/                     # 🏷️ Tags pages
β”‚   β”‚   β”œβ”€β”€ πŸ“‚ tasks/                    # βœ… Tasks page
β”‚   β”‚   β”œβ”€β”€ πŸ“‚ trash/                    # πŸ—‘οΈ Trash page
β”‚   β”‚   β”œβ”€β”€ πŸ“„ layout.tsx                # πŸ–ΌοΈ Root layout
β”‚   β”‚   └── πŸ“„ page.tsx                  # 🏠 Home page
β”‚   β”œβ”€β”€ πŸ“‚ components/
β”‚   β”‚   β”œβ”€β”€ πŸ“„ AuthGuard.tsx             # πŸ›‘οΈ Auth wrapper
β”‚   β”‚   β”œβ”€β”€ πŸ“„ CreateNotebookModal.tsx   # πŸ“’ Notebook modal
β”‚   β”‚   β”œβ”€β”€ πŸ“„ NoteCard.tsx              # πŸƒ Note card
β”‚   β”‚   β”œβ”€β”€ πŸ“„ NoteEditor.tsx            # ✏️ TipTap editor
β”‚   β”‚   β”œβ”€β”€ πŸ“„ ScratchPad.tsx            # πŸ“‹ Scratch pad
β”‚   β”‚   β”œβ”€β”€ πŸ“„ SessionProvider.tsx       # πŸ”‘ Session provider
β”‚   β”‚   β”œβ”€β”€ πŸ“„ Sidebar.tsx               # πŸ“± Navigation sidebar
β”‚   β”‚   └── πŸ“„ TagManager.tsx            # 🏷️ Tag selector
β”‚   └── πŸ“‚ lib/
β”‚       β”œβ”€β”€ πŸ“„ auth.ts                   # πŸ” NextAuth config
β”‚       β”œβ”€β”€ πŸ“„ auth-helpers.ts           # πŸ”§ Auth utilities
β”‚       β”œβ”€β”€ πŸ“„ db.ts                     # πŸ—„οΈ Database connection
β”‚       β”œβ”€β”€ πŸ“„ schema.ts                 # πŸ“Š Drizzle schema
β”‚       └── πŸ“„ types.ts                  # πŸ“ TypeScript types
β”œβ”€β”€ πŸ“„ drizzle.config.ts                 # βš™οΈ Drizzle config
β”œβ”€β”€ πŸ“„ next.config.ts                    # βš™οΈ Next.js config
β”œβ”€β”€ πŸ“„ package.json                      # πŸ“¦ Dependencies
β”œβ”€β”€ πŸ“„ .env.example                      # πŸ”’ Env template
└── πŸ“„ README.md                         # πŸ“– Documentation

πŸ—„οΈ Database Schema

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚    users      β”‚     β”‚   notebooks  β”‚     β”‚    tags       β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€     β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€     β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ id (PK)      │◄────│ userId (FK)  β”‚     β”‚ id (PK)      β”‚
β”‚ name         β”‚     β”‚ id (PK)      β”‚     β”‚ userId (FK)  β”‚
β”‚ email        β”‚     β”‚ name         β”‚     β”‚ name         β”‚
β”‚ image        β”‚     β”‚ color        β”‚     β”‚ createdAt    β”‚
β”‚ createdAt    β”‚     β”‚ isDefault    β”‚     β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜
β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜            β”‚
       β”‚                    β”‚              β”Œβ”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”
       β”‚              β”Œβ”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”      β”‚  note_tags  β”‚
       β”‚              β”‚    notes    β”‚      β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
       β”‚              β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€      β”‚ noteId (FK) β”‚
       β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”‚ userId (FK) │──────│ tagId (FK)  β”‚
       β”‚              β”‚ notebookId  β”‚      β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
       β”‚              β”‚ title       β”‚
       β”‚              β”‚ content     β”‚
       β”‚              β”‚ isPinned    β”‚
       β”‚              β”‚ isFavorite  β”‚
       β”‚              β”‚ isTrashed   β”‚
       β”‚              β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
       β”‚
       β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
       β”œβ”€β”€β”‚    tasks      β”‚     β”‚ scratch_pad  β”‚
       β”‚  β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€     β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
       └──│ userId (FK)  β”‚     β”‚ userId (FK)  β”‚
          β”‚ title        β”‚     β”‚ content      β”‚
          β”‚ isCompleted  β”‚     β”‚ updatedAt    β”‚
          β”‚ dueDate      β”‚     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
          β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

🀝 Contributing

Contributions are welcome! Please follow these steps:

  1. 🍴 Fork the repository
  2. πŸ”€ Create a feature branch (git checkout -b feature/amazing-feature)
  3. πŸ’Ύ Commit your changes (git commit -m 'Add amazing feature')
  4. πŸ“€ Push to the branch (git push origin feature/amazing-feature)
  5. πŸ“© Open a Pull Request

πŸ“„ License

This project is licensed under the MIT License β€” see the LICENSE file for details.


πŸ‘¨β€πŸ’» Author

Romi Nur Ismanto β€” @romizone


Made with ❀️ and β˜• β€” Powered by Next.js & Neon

About

A modern note-taking web app inspired by Evernote. Built with Next.js 16, Neon PostgreSQL, Google OAuth, TipTap Editor & Vercel.

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors