NoteScript is a modern, full-featured note-taking platform built with the MERN stack. Create, organize, and share your thoughts with a powerful rich text editor supporting formatting, headers, lists, links, and JavaScript syntax highlighting for code blocks. Enjoy seamless public/private note sharing, tag-based organization, advanced search capabilities, and a beautiful dark/light theme system.
- User Authentication - Secure registration and login
- Rich Text Editor - Full-featured editor with formatting options
- Public/Private Notes - Share notes publicly or keep them private
- Tag System - Organize notes with custom tags
- Search & Filter - Find notes quickly with advanced search
- Responsive Design - Works perfectly on all devices
- Dark/Light Theme - Toggle between themes
- Bold, italic, strikethrough, and inline code
- Headers (H1, H2, H3)
- Bullet and numbered lists
- Blockquotes and horizontal rules
- Link support with easy management
- JavaScript Syntax Highlighting - Beautiful code block highlighting for JavaScript
- Undo/redo functionality
- Auto-save functionality
- Note view counts
- Like system for public notes
- Tag-based filtering
- Sorting by date, title, and popularity
- User profiles and statistics
The app uses a carefully chosen color palette:
- Primary (Raisin Black):
#272727- Main UI elements - Secondary (Buff):
#D4AA7D- Accent elements - Accent (Sunset):
#EFD09E- Highlights and CTAs
- React 18 - Modern React with hooks
- Vite - Next generation frontend tooling
- React Router - Client-side routing
- Zustand - Lightweight state management
- TailwindCSS - Utility-first CSS framework
- shadcn/ui - Beautiful, accessible components
- Tiptap - Rich text editor
- Lowlight - JavaScript syntax highlighting for code blocks
- Lucide React - Beautiful icons
- Node.js - Runtime environment
- Express.js - Web framework
- MongoDB - NoSQL database
- Mongoose - MongoDB ODM
- JWT - Authentication tokens
- bcryptjs - Password hashing
- Express Validator - Input validation
NoteScript/
βββ client/ # React frontend
β βββ public/
β βββ src/
β β βββ components/ # Reusable components
β β βββ pages/ # Page components
β β βββ store/ # Zustand stores
β β βββ lib/ # Utilities
β β βββ ...
β βββ package.json
βββ server/ # Node.js backend
β βββ models/ # Mongoose models
β βββ routes/ # API routes
β βββ middleware/ # Custom middleware
β βββ package.json
βββ package.json # Root package.json
βββ README.md
- Node.js (v16 or higher)
- MongoDB (local or cloud instance)
- npm or yarn
-
Clone the repository
git clone <repository-url> cd notescript
-
Install dependencies for all packages
npm run install-deps
-
Set up environment variables
Create
.envfile in theserverdirectory:NODE_ENV=development PORT=5000 MONGODB_URI=mongodb://localhost:27017/twilight-note-flow JWT_SECRET=your-super-secret-jwt-key-change-this-in-production JWT_EXPIRES_IN=7d CLIENT_URL=http://localhost:3000
-
Start the development servers
npm run dev
This will start:
- Backend server on
http://localhost:5000 - Frontend app on
http://localhost:3000
- Backend server on
cd server
npm install
cp .env.example .env
# Edit .env with your configuration
npm run devcd client
npm install
npm run devnpm run dev- Start both frontend and backendnpm run server- Start only backendnpm run client- Start only frontendnpm run install-deps- Install dependencies for all packages
npm start- Start production servernpm run dev- Start development server with nodemon
npm run dev- Start development server with Vitenpm run build- Build for productionnpm run preview- Preview production build locallynpm run lint- Run ESLint
{
name: String,
email: String (unique),
password: String (hashed),
avatar: String,
isActive: Boolean,
createdAt: Date,
updatedAt: Date
}{
title: String,
content: String (HTML),
tags: [String],
isPublic: Boolean,
author: ObjectId (ref: User),
likes: [ObjectId] (ref: User),
views: Number,
isActive: Boolean,
createdAt: Date,
updatedAt: Date
}POST /api/auth/register- Register new userPOST /api/auth/login- Login userGET /api/auth/me- Get current userPUT /api/auth/profile- Update user profile
GET /api/notes- Get notes (with filtering)GET /api/notes/:id- Get single notePOST /api/notes- Create new notePUT /api/notes/:id- Update noteDELETE /api/notes/:id- Delete notePOST /api/notes/:id/like- Toggle like on noteGET /api/notes/tags/all- Get all tags
GET /api/users/:id- Get user profileGET /api/users/:id/notes- Get user's public notesGET /api/users/:id/stats- Get user statistics
- Create an account or use the demo credentials
- Create your first note using the rich text editor
- Add tags to organize your notes
- Toggle privacy to share notes publicly
- Explore public notes from the community
- Email:
demo@example.com - Password:
demo123
- Use the toolbar to format your text
- Add headers, lists, links, and more
- Auto-save keeps your work safe
- Add multiple tags to categorize notes
- Use search to find notes quickly
- Filter by tags, author, or date
- Toggle notes to public to share with community
- View and like other users' public notes
- Keep personal notes private
- Build the client:
cd client && npm run build - Deploy the
buildfolder to your hosting service - Set environment variables if needed
- Deploy the
serverdirectory - Set environment variables:
NODE_ENV=productionMONGODB_URI=<your-mongodb-connection-string>JWT_SECRET=<your-jwt-secret>CLIENT_URL=<your-frontend-url>
- Create a MongoDB Atlas cluster
- Get the connection string
- Update
MONGODB_URIin your environment variables
- Fork the repository
- Create a feature branch:
git checkout -b feature-name - Make your changes and commit:
git commit -m 'Add feature' - Push to the branch:
git push origin feature-name - Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
- React - Frontend framework
- Express.js - Backend framework
- MongoDB - Database
- TailwindCSS - Styling
- shadcn/ui - UI components
- Tiptap - Rich text editor
- Zustand - State management
If you have any questions or issues, please:
- Check the Issues page
- Create a new issue if needed
- Contact the maintainers
Built with β€οΈ using the MERN stack