Skip to content

A modern, secure file and link sharing platform built with Next.js, Prisma, and NextAuth. Share URLs, code snippets, and files with customizable expiration, privacy, and QR codes.

License

Notifications You must be signed in to change notification settings

TuroYT/snowshare

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

SnowShare Logo

SnowShare

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.

Features ✨

LinkShare πŸ”—

  • 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 πŸ“±

PasteShare πŸ“‹

  • 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

FileShare πŸ“

  • Secure file uploads with size limits
  • Automatic file type detection
  • Download tracking πŸ“₯
  • Same expiration and protection features

User Management πŸ‘₯

  • 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

Getting Started πŸš€

  • Node.js 18+ and npm/yarn
  • PostgreSQL database

Prerequisites βœ…

  • Node.js 18+ and npm/yarn

  • PostgreSQL database

  • Node.js 18+ and npm/yarn

  • PostgreSQL database

Installation πŸ› οΈ

  1. Clone the repository

    git clone https://github.com/TuroYT/snowshare
    cd snowshare
    
  2. Install dependencies

    npm install
    
  3. Set up environment variables Create a .env file 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
    

Docker

You can run the app and a PostgreSQL database locally using Docker Compose.

  1. Copy .env.example to .env and adjust values as needed.
  2. Build and start the stack:
docker compose up -d --build

The 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.

  1. Initialize the database

    npx prisma migrate dev
    
  2. Start the development server

    npm run dev
    
  3. Open http://localhost:3000 with your browser to see the result.

Project Structure πŸ—‚οΈ

/
β”œβ”€β”€ 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

πŸ™ Acknowledgments

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License βš–οΈ

This project is licensed under the MIT License - see the LICENSE file for details.

Star History

Star History Chart

Acknowledgments / Credits πŸ™Œ

About

A modern, secure file and link sharing platform built with Next.js, Prisma, and NextAuth. Share URLs, code snippets, and files with customizable expiration, privacy, and QR codes.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •