SnowShare is a modern, secure file and link sharing platform built with Next.js, Prisma, and NextAuth.
It provides a clean, user-friendly interface for sharing URLs, text snippets, and files with customizable options for expiration, privacy, and access.
- Share any URL with a customizable shortened link
- Set expiration times (1 day to solar explosion) β³
- Option for no expiration (authenticated users)
- Custom slugs for personalized links
- Password protection for enhanced security π
- Instant QR code generation for shared links π±
- Share code snippets and text with syntax highlighting π¨
- Support for multiple programming languages
- Expiration options and password protection π
- Ideal for sharing code samples, configuration files, or any text content
- Secure file uploads with size limits
- Automatic file type detection
- Download tracking π₯
- Same expiration and protection features
-
User registration and authentication via NextAuth π
-
Frontend: Next.js 15.5, React 19.1, TailwindCSS 4
-
Authentication: NextAuth.js with bcrypt password hashing
-
Special Features: QR code generation, custom URL slugs
- Node.js 18+ and npm/yarn
- PostgreSQL database
-
Node.js 18+ and npm/yarn
-
PostgreSQL database
-
Node.js 18+ and npm/yarn
-
PostgreSQL database
-
Clone the repository
git clone https://github.com/TuroYT/snowshare cd snowshare -
Install dependencies
npm install -
Set up environment variables Create a
.envfile in the root directory with the following variables:# Database DATABASE_URL="postgresql://username:password@localhost:5432/snowshare" # NextAuth NEXTAUTH_URL="http://localhost:3000" NEXTAUTH_SECRET="your-secret-key" # Auth (allow or disallow user signups) ALLOW_SIGNUP=true
You can run the app and a PostgreSQL database locally using Docker Compose.
- Copy
.env.exampleto.envand adjust values as needed. - Build and start the stack:
docker compose up -d --buildThe app will be available at http://localhost:3000 and PostgreSQL at port 5432. Data persists in the db-data volume and uploaded files in the local uploads/ folder.
On startup, the app runs prisma migrate deploy to ensure the database schema is up to date.
-
Initialize the database
npx prisma migrate dev -
Start the development server
npm run dev -
Open http://localhost:3000 with your browser to see the result.
/
βββ prisma/ # Prisma schema and migrations
βββ public/ # Static assets
βββ src/
βββ app/ # Next.js App Router structure
β βββ api/ # API routes
β βββ auth/ # Authentication pages
β βββ protected/ # Protected slugs and shares
β βββ s/ # Short link redirects
βββ components/ # React components
βββ hooks/ # Custom React hooks
βββ lib/ # Utility functions and shared code
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Next.js - The React Framework
- Prisma - Next-generation ORM
- NextAuth.js - Authentication for Next.js
- TailwindCSS - Utility-first CSS framework