A modern, full-featured note-taking application built with React, Node.js, Express, Prisma, and PostgreSQL.
- Sign Up: Users can register with first name, last name, username, email, and password, captcha
- Login: Authentication using email or username with password
- JWT Authentication: Secure token-based authentication
- Protected Routes: Certain pages accessible only to authenticated users
- Create Notes: Rich note creation with title, synopsis, and markdown content
- View Notes: Clean, card-based layout for browsing notes
- Edit Notes: Update existing notes with pre-populated forms
- Soft Delete: Notes moved to trash instead of permanent deletion
- Restore Notes: Recover deleted notes from trash
- Markdown Support: Full markdown rendering for note content
- Profile Management: Update personal information (name, username, email)
- Avatar Upload: Profile picture upload via Cloudinary integration
- Password Change: Secure password update with current password verification
- Initials Fallback: Display user initials when no avatar is uploaded
- Responsive Design: Optimized for desktop, tablet, and mobile devices
- Clean UI: Modern interface with smooth animations and transitions
- Dashboard: Central hub showing all user notes
- Trash Management: Dedicated page for deleted notes
- Landing Page: Introduction page for new users
- Node.js: Runtime environment
- Express.js: Web framework
- Prisma: Database ORM
- PostgreSQL: Database
- JWT: Authentication tokens
- Cloudinary: Image upload and storage
- bcryptjs: Password hashing
- Helmet: Security middleware
- CORS: Cross-origin resource sharing
- React 18: UI library with hooks
- TypeScript: Type safety
- React Router: Client-side routing
- Tailwind CSS: Utility-first styling
- Axios: HTTP client
- React Hook Form: Form management
- React Hot Toast: Notifications
- React Markdown: Markdown rendering
- Lucide React: Icon library
- Node.js (v16 or higher)
- PostgreSQL database
- Cloudinary account (for image uploads)
- Backend Environment (create
backend/.env):
DATABASE_URL="postgresql://username:password@localhost:5432/notely"
JWT_SECRET="your-super-secret-jwt-key-here"
JWT_EXPIRES_IN="7d"
CLOUDINARY_CLOUD_NAME="your-cloudinary-cloud-name"
CLOUDINARY_API_KEY="your-cloudinary-api-key"
CLOUDINARY_API_SECRET="your-cloudinary-api-secret"
PORT=5000
NODE_ENV="development"
FRONTEND_URL="http://localhost:5173"- Install all dependencies:
npm run setup- Set up the database:
cd backend
npx prisma migrate --name "name"- Start the development servers:
npm run devThis will start both the backend server (port 5000) and frontend development server (port 5173).
POST /api/auth/register- Register a new userPOST /api/auth/login- Login userPOST /api/auth/logout- Logout userPOST /api/auth/password- Update user password
GET /api/user/profile- Get user profilePATCH /api/user/- Update user informationPATCH /api/user/avatar- Upload profile picture
POST /api/entries- Create new entryGET /api/entries- Get all user entriesGET /api/entries/trash- Get deleted entriesGET /api/entry/:id- Get specific entryPATCH /api/entry/:id- Update entryPATCH /api/entry/restore/:id- Restore deleted entryDELETE /api/entry/:id- Soft delete entry
id(UUID, Primary Key)firstName(String, Required)lastName(String, Required)email(String, Unique, Required)username(String, Unique, Required)password(String, Required, Hashed)avatar(String)dateJoined(DateTime)lastProfileUpdate(DateTime)isDeleted(Boolean, Default: false)
id(UUID, Primary Key)title(String, Required)synopsis(String, Required)content(String, Required)isDeleted(Boolean, Default: false)dateCreated(DateTime)lastUpdated(DateTime)userId(Foreign Key to Users)
- Password Hashing: bcryptjs with salt rounds
- JWT Authentication: Secure token-based auth
- Input Validation: Server-side validation using express-validator
- CORS Protection: Configured for specific origins
- Rate Limiting: Prevents abuse, bruteforce and DoS attacks
- Helmet: Security headers
- Environment Variables: Sensitive data protection
npm run dev- Start both frontend and backendnpm run setup- Install all dependencies
npm run dev- Start development servernpx prisma migrate --name "name"- Run database migrationsnpx prisma studio- Open Prisma Studio
npm run dev- Start development servernpm run build- Build for productionnpm run lint- Run ESLint
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License.