A Next.js-based portfolio website for showcasing interactive 3D scenes using Gaussian Splatting and web viewers.
Demo: Hosted on Vercel
This Gallery website features:
- Grid-based pages displaying 3D scenes
- Interactive viewer for each scene using Splat technology
- Automatic PlayCanvas-based supersplat viewer for
.compressed.plyassets with orbit/reset controls - Integration with NeonDB for data storage
- S3 storage for 3D assets
- Node.js
- npm, yarn, pnpm, or bun
- NeonDB account
- AWS S3 bucket for asset storage
- Clone the repository
- Install dependencies:
npm install
# or
yarn install
# or
pnpm install
# or
bun install- Copy environment variables:
cp example.env.local .env.local- Start the development server:
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev- Open http://localhost:3000 with your browser to see the result.
-
Set up environment variables:
- Ensure
DATABASE_URLis configured in.env.local
- Ensure
-
Generate migration files:
npx drizzle-kit generate- Run migrations:
npx drizzle-kit migrate- Insert dummy data:
- Use the SQL script located at
script/insertSplat.sql - Execute the script against your Postgres database in NeonDB
- Use the SQL script located at
- Primary viewer: antimatter15's Splat Viewer
- Wrapper: drei-vanilla
- Supersplat renderer: PlayCanvas with
@playcanvas/reactfor.compressed.plyscenes, orbit controls, and reset hooks
- Currently configured for S3 URLs
- Viewer supports any public URL (upcoming feature)
- The database will be storing the S3 keys instead of the full path to support dynamic URL signing and easier migration between storage buckets
Multipart uploads rely on reading the ETag from each presigned PUT response. Update your bucket CORS rule to expose that header:
[
{
"AllowedHeaders": ["*"],
"AllowedMethods": ["GET", "PUT", "POST"],
"AllowedOrigins": ["*"],
"ExposeHeaders": ["ETag"]
}
]After saving the policy, wait for it to propagate and verify in your browser devtools that each part response now includes the ETag header before calling the completion endpoint.
Deploy on Vercel (recommended):
- Visit the Vercel Platform
- Follow the deployment steps
For more deployment options, see the Next.js deployment documentation.