Skip to content

A minimal, secure diary web app designed for privacy-focused users.

License

Notifications You must be signed in to change notification settings

Pahasara/PureNote

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PureNote

A minimal, secure full-stack encrypted diary and note-taking platform.

Backend: ASP.NET Core 10 · EF Core 10 · Identity · JWT · PostgreSQL · Scalar
Frontend: React 19 · TypeScript · Vite · Tailwind CSS · Zustand


Features

Backend

  • Register & login using email or username
  • JWT-based authentication with refresh tokens
  • End-to-end encryption for diary entries
  • EF Core with PostgreSQL
  • Clean layered architecture (Entities, DTOs, Services, Endpoints, Validators)
  • Automatic OpenAPI generation + Scalar UI
  • FluentValidation for request validation

Frontend

  • Modern React with TypeScript
  • Secure authentication flow
  • Diary CRUD operations (Create, Read, Update, Delete)
  • Zustand state management
  • Tailwind CSS styling
  • HTTPS development environment

Requirements

Backend

  • .NET 10 SDK
  • PostgreSQL 18
  • EF Core tools:
dotnet tool install --global dotnet-ef

Frontend

  • *Node.js 18+
  • npm or pnpm

Linux / Arch Users

Install backend dependencies:

sudo pacman -S dotnet-sdk aspnet-runtime postgresql

Install frontend dependencies:

sudo pacman -S nodejs npm

Docs:

Windows Users


Configuration

Backend (appsettings.json)

Database:

"ConnectionStrings": {
  "DefaultConnection": "Host=localhost;Database=purenote;Username=YOUR_USER;Password=YOUR_PASS"
}

JWT:

"Jwt": {
  "Key": "your-super-long-unique-32-byte-secret-key-here",
  "Issuer": "PureNote",
  "Audience": "PureNoteUsers",
  "ExpiryInMinutes": 60
}

CORS:

"AllowedOrigins": [
  "https://localhost:3000"
]

Frontend (src/services/api.ts)

Update the API base URL if needed:

const API_BASE_URL = "https://localhost:7000/api";

Setup & Running

1. Backend Setup

cd PureNote.Api

# Apply migrations
dotnet ef database update

# Run the API
dotnet run

API will be available at:

  • HTTPS: https://localhost:7000
  • Scalar Docs: https://localhost:7000/scalar

2. Frontend Setup

cd purenote-web

# Install dependencies
npm install

# Run development server
npm run dev

Frontend will be available at:

  • HTTPS: https://localhost:3000

Development

Backend

Run with hot reload:

dotnet watch

Frontend

Development mode:

npm run dev

API Documentation

Interactive API documentation is available via Scalar:

https://localhost:7000/scalar

Explore endpoints, test requests, and view schemas directly in the browser.


Tech Stack

Backend

  • ASP.NET Core 10 - Minimal APIs
  • EF Core 10 - ORM with PostgreSQL
  • Identity 10.0.0 - User management
  • JWT Authentication 10.0.0 - Secure token-based auth
  • Npgsql 10.0.0 - PostgreSQL provider
  • Scalar.AspNetCore 2.11.0 - API documentation
  • FluentValidation 12.1.0 - Request validation

Frontend

  • React 19 - UI library
  • TypeScript - Type safety
  • Vite - Build tool & dev server
  • Tailwind CSS 4 - Utility-first styling
  • Zustand - Lightweight state management
  • React Router 7 - Client-side routing
  • Axios - HTTP client

Security

  • End-to-end encryption for diary entries
  • JWT authentication with secure token handling
  • HTTPS-only in development and production
  • Input validation with FluentValidation
  • CORS configured for frontend origin
  • Password hashing via ASP.NET Core Identity

License

Licensed under the GNU GPLv3.

About

A minimal, secure diary web app designed for privacy-focused users.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published