← Back to full index
# Notes App

A full-stack notes application with a Django REST API and a React frontend, built to practise token-based authentication and per-user data isolation.

- Role: Sole Developer (Full-Stack)
- Date: Mar 2025
- Categories: project
- Tech: Django, Django REST Framework, React, Vite, JWT, PostgreSQL
- GitHub: https://github.com/AmulyaJain2004/Notes-app

## Overview

This project implements a personal notes application in which each user can create, read, update and delete only their own notes. Its main purpose was to practise designing a secure API and connecting it to a single-page frontend.

## Features

- **Authentication:** users register, log in and receive JSON Web Tokens. The client refreshes tokens automatically, so sessions continue without repeated logins.
- **Data isolation:** every request is scoped to the authenticated user, so users only see their own notes.
- **Notes management:** create, edit and delete notes, with the interface updating without a page reload.

## System Design

```mermaid
flowchart TD
    UI["React 18 + Vite SPA<br/>React Router · ProtectedRoute"] --> Axios["Axios client<br/>adds Bearer token to every request"]
    Axios --> API["Django REST Framework"]
    API --> Reg["/api/user/register/"]
    API --> Token["/api/token/ · /api/token/refresh/<br/>SimpleJWT"]
    API --> Notes["/api/notes/<br/>list · create · update · delete"]
    Notes --> Scope["IsAuthenticated +<br/>queryset filtered by author"]
    Scope --> DB[("PostgreSQL or SQLite")]
    Reg --> DB
    Axios -. "on 401: refresh once, retry the request,<br/>or send the user to /login" .-> Token
```

- **Backend:** Django 5.1 and Django REST Framework with seven endpoints for registration, token issue and refresh, and note listing, creation, update and deletion. It runs on PostgreSQL or SQLite.
- **Data isolation:** every note view requires authentication and builds its queryset from `Note.objects.filter(author=request.user)`, and new notes take their author from the token, so one user can never read or change another user's notes.
- **Frontend:** a React 18 app built with Vite. A shared Axios instance attaches the access token to each request, and a response interceptor catches a 401, refreshes the access token once and replays the original request, so sessions continue without repeated logins.

## Status

This is a personal project that I designed and developed on my own. The application covers the core workflow only. Sharing, collaboration and offline support are not implemented, and it has not been deployed publicly.

---

Back to the full index: /agent