This is a Next.js project bootstrapped with create-next-app.
First, run the development server:
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun devOpen http://localhost:3000 with your browser to see the result.
You can start editing the page by modifying app/page.tsx. The page auto-updates as you edit the file.
This project uses next/font to automatically optimize and load Geist, a new font family for Vercel.
To learn more about Next.js, take a look at the following resources:
- Next.js Documentation - learn about Next.js features and API.
- Learn Next.js - an interactive Next.js tutorial.
You can check out the Next.js GitHub repository - your feedback and contributions are welcome!
The project uses an environment-agnostic storage adapter (lib/storage.ts) that supports Vercel Blob, Local Storage (VPS/Shared Hosting), and a Dev Fallback.
- Vercel Blob: Used if
BLOB_READ_WRITE_TOKENis set. - Local Storage (VPS): Used if
LOCAL_UPLOADS_DIR(absolute path) is set. - Dev Fallback: Defaults to
public/folder only indevelopmentmode. - Error: Throws an error in
productionif no storage is configured.
Add these to your .env.local:
# Optional: For Vercel Blob
BLOB_READ_WRITE_TOKEN=your_token_here
# Optional: For VPS / Shared Hosting
LOCAL_UPLOADS_DIR=/var/www/edinn/uploads
PUBLIC_UPLOADS_BASE_URL=https://edinnschool.com/uploadsIf using LOCAL_UPLOADS_DIR on a VPS, map the public URL path to the directory:
location /uploads/ {
alias /var/www/edinn/uploads/;
expires 30d;
add_header Cache-Control "public, no-transform";
}