Skip to content

Anuragreat/Note_front

Repository files navigation

πŸ“ HD Notes App - React Frontend

A modern, responsive React frontend for the HD Notes application that integrates with a Spring Boot backend. This application provides a beautiful user interface for OTP-based authentication and notes management.

πŸ”— Backend Live: noteapp-0eu4.onrender.com πŸ”— Frontend Live: note-front-tau.vercel.app


✨ Features

  • πŸ“± Responsive Design: Mobile-first, works on all devices
  • πŸ” OTP + JWT Authentication: Secure login using OTP sent to email
  • πŸ“ Notes Management: Create, view, and delete notes
  • 🎨 Modern UI: Clean and minimal design
  • πŸ”„ Protected Routes: Redirects automatically if not authenticated

πŸ“Έ Screenshots

Screenshot 1 Screenshot 2 Screenshot 3

Includes:

  • Sign Up: Register with email
  • Send OTP & Sign In: Login with OTP (JWT issued after verification)
  • Dashboard: Manage notes (create, view, delete)

βš™οΈ Prerequisites

  • Node.js (v14 or higher)
  • npm or yarn
  • Spring Boot backend running locally (http://localhost:8080) or via deployed backend

πŸ›  Installation

  1. Clone repo

    git clone https://github.com/Anuragreat/noteapp-frontend.git
    cd noteapp-frontend
  2. Install dependencies

    npm install
  3. Start development server

    npm start
  4. Open in browser

    http://localhost:3000
    

πŸ“‚ Project Structure

src/
β”œβ”€β”€ components/
β”‚   β”œβ”€β”€ SignUp.js        # User registration
β”‚   β”œβ”€β”€ SignIn.js        # OTP-based login
β”‚   β”œβ”€β”€ Dashboard.js     # Notes dashboard
β”‚   └── *.css            # Component styles
β”œβ”€β”€ contexts/
β”‚   └── AuthContext.js   # Handles JWT auth state
β”œβ”€β”€ App.js               # Main app component
└── index.js             # Entry point

πŸ”— Backend Integration

This frontend works with your Spring Boot backend APIs:

πŸ” Authentication

  • POST /api/auth/signup β†’ Register new user
  • POST /api/auth/send-otp?email=user@mail.com β†’ Send OTP
  • POST /api/auth/login β†’ Login with email + OTP β†’ returns JWT

πŸ“ Notes

  • POST /api/notes/add β†’ Create a new note (requires JWT in headers)
  • GET /api/notes/all/{userId} β†’ Fetch all notes
  • DELETE /api/notes/delete/{id} β†’ Delete a note

πŸ“€ Example Requests

πŸ”‘ Login Request

{
  "email": "john@example.com",
  "otp": "123456"
}

πŸ“ Create Note Request

{
  "content": "Your note content here"
}

πŸ–Œ Styling

  • CSS3 with Flexbox & Grid
  • Responsive design for both mobile & desktop
  • Smooth animations and transitions

🌍 Browser Support

βœ… Chrome, βœ… Firefox, βœ… Safari, βœ… Edge (latest versions)


πŸ›  Troubleshooting

  • Backend not connecting β†’ Check backend is running at port 8080 or update proxy in package.json

  • Invalid JWT β†’ Clear localStorage and re-login

  • Port conflict β†’ Run with custom port:

    PORT=3001 npm start

About

πŸ“ Notes App Frontend (React) A modern React-based frontend for the Notes App with a responsive UI. It handles user signup, OTP-based login, and note management (create, view, delete), while managing authentication state via JWT tokens. πŸ”— Live: note-front-tau.vercel.app

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors