Novri — File storage, sharing and PDF tools
Upload, organise and share files with a public link, and edit PDFs right in the browser.
Novri is the frontend of a file store. Users sign in with email, Google or phone OTP, upload and manage files, share them with a public link and recover deleted ones from Trash. Merge, split, rotate and watermark PDFs without the file leaving the browser.
- 3
- ways to sign in
- 4
- in-browser PDF tools
- 11
- pages
- Public
- share links
What it does
File dashboard
Drag-and-drop upload with a searchable, sortable, filterable file table.
Public share links
Mark a file public and anyone with the link can view or download it, no login.
Trash and restore
Deleted files go to Trash first and can be restored or emptied.
PDF tools
Merge, extract pages, rotate and watermark, all done in the browser.
Three sign-in options
Email and password, Google, or phone number with OTP through Firebase.
Guarded dashboard
proxy.js redirects signed-out visitors before /dashboard loads; the backend still checks every request.
Architecture at a glance
- 1The browser calls relative paths like /api/files; Next.js rewrites them to BACKEND_ORIGIN.
- 2proxy.js does a fast session-cookie check for /dashboard/*, and the backend re-verifies each request.
- 3lib/api.js serves the browser, lib/serverApi.js serves server components.
- 4AuthContext and ToastContext carry the signed-in user and notifications across the app.
README
The repository's own README.md, with its diagrams, folder structure and setup steps.
Filestore — Frontend (Novri)
This is the website — the part users actually see and click around in. It's called Novri. It talks to the backend API to log people in, upload files, list files, and share them.
If the backend is the vault + guard, this is the reception desk and the rooms the user actually walks through.
1. Tech stack (what this is built with)
| Piece | Tool | Why |
|---|---|---|
| Framework | Next.js 16 (App Router) | Renders pages, handles routing |
| UI library | React 19 | Builds the interface out of components |
| Styling | Tailwind CSS 4 | Utility classes for styling |
| Icons | lucide-react | Icon set used across the app |
| Login (Google & Phone) | Firebase Auth | Handles Google sign-in and OTP-based phone login |
| PDF tools | pdf-lib, pdfjs-dist | Merge/split/rotate/watermark PDFs, all in the browser |
| Language | JavaScript (with some TypeScript files) | — |
2. Folder structure (where to find things)
app/ → every page of the site lives here (Next.js App Router)
page.js → the homepage (landing page)
login/, signup/ → auth pages
forgot-password/,
reset-password/ → password reset flow
s/[token]/ → the public "someone shared a file with you" page
dashboard/ → everything after logging in
page.jsx → your files list
tools/ → PDF tools
trash/ → deleted files (recoverable)
profile/, settings/ → account pages
components/
auth/ → login/signup forms, Google button, OTP phone login
dashboard/ → file table, upload zone, sidebar, preview modal
landing/ → sections that make up the homepage
layout/ → navbar, footer, logo
tools/ → the PDF tools workspace
ui/ → small reusable pieces (Button, Badge, Modal)
lib/
api.js → helper for calling the backend from the browser
serverApi.js → helper for calling the backend from server components
firebase.js → Google/Phone login setup
AuthContext.jsx → keeps track of "who's logged in" across the app
ToastContext.jsx → pop-up notifications (e.g. "File uploaded")
format.js → formatting helpers (file sizes, dates, etc.)
proxy.js → checks you're logged in before letting you into /dashboard/*
Rule of thumb: if you're looking for a page, check app/. If you're
looking for a reusable piece of UI, check components/. If you're looking
for "how does this talk to the backend," check lib/.
3. How this app talks to the backend
The browser never calls the backend directly by its full URL. Instead:
- The browser calls a relative path like
/api/files. - Next.js rewrites that request to the real backend URL (set in
BACKEND_ORIGIN) — seeproxy.jsandnext.config.mjs. - This keeps cookies working correctly and avoids exposing the backend's real address to the browser.
proxy.js also does a quick check: if you try to open /dashboard/...
without a session cookie, you're redirected to /login. This is just a fast
first check — the backend still double-checks on every actual request, since
a cookie looking valid doesn't mean it is valid.
4. Step-by-step: run this on your computer
Step 1 — Make sure the backend is running first
This app needs the backend running (usually at
http://localhost:4000), since almost everything here depends on it.
Step 2 — Install Node.js
node -v
Step 3 — Install the packages
cd frontend
npm install
Step 4 — Create your environment file
cp .env.example .env.local
Open .env.local and fill in:
BACKEND_ORIGIN— where your backend is running, e.g.http://localhost:4000NEXT_PUBLIC_FIREBASE_API_KEYNEXT_PUBLIC_FIREBASE_AUTH_DOMAINNEXT_PUBLIC_FIREBASE_PROJECT_IDNEXT_PUBLIC_FIREBASE_APP_ID
(The Firebase values come from your Firebase project settings — only needed if you want Google/Phone login to work. Email/password login works without them.)
Step 5 — Start the app
npm run dev
Step 6 — Open it in your browser Go to http://localhost:3000.
5. Useful scripts
| Command | What it does |
|---|---|
npm run dev | Start the app for local development (auto-reloads on save) |
npm run build | Build the production-ready version |
npm start | Run the production build (run build first) |
npm run lint | Check code for style/errors with ESLint |
npm run format | Auto-format code with Prettier |
6. What a user can actually do (features)
Before logging in
- View the landing page
- Sign up / log in with email + password, Google, or phone number (OTP)
- Reset a forgotten password via email link
After logging in (Dashboard)
- Upload files (drag-and-drop or click to browse)
- See all files in a searchable, sortable, filterable table
- Rename a file
- Mark a file Public (get a shareable link) or Private
- Preview a file, or download it
- Delete a file — it goes to Trash first, not gone forever
- Restore a file from Trash, or empty the Trash
- Use PDF Tools: merge PDFs together, extract specific pages, rotate pages, or stamp a watermark on every page — all done in the browser
- View/update profile and account settings
Public share page (/s/[token])
- Anyone with the link can view/download the shared file — no login needed — as long as the owner hasn't turned sharing off.
7. Notes for anyone editing this project
- This project uses Next.js 16, which has some differences from older
Next.js versions you may be used to. If something behaves unexpectedly,
check the docs bundled inside
node_modules/next/dist/docs/before assuming it's a bug. - Run
npm run lintandnpm run formatbefore committing changes to keep code style consistent.