Skip to content

Latest commit

History

29 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

  • give it a star⭐

Snip-Shell

Snip-Shell is a full-stack web application for organizing, managing, and sharing content. Users can collect URLs, Twitter posts, and YouTube videos, organize them in a personal dashboard, and generate shareable links for public access.


Table of Contents


Overview

Snip-Shell enables users to:

  • Collect Content: Save URLs, Twitter embeds, and YouTube videos with title and description.
  • Organize: View and manage saved content in a personal dashboard.
  • Share: Generate a unique hash-based link to publicly display collections.
  • Discover: Browse other users' shared content without authentication.

Features

  • User authentication (signup/signin) with JWT.
  • Content creation, deletion, and management.
  • Dashboard for personal content management.
  • Public sharing via unique hash links.

System Architecture

  • Three-tier architecture: Frontend (React) ↔ Backend (Express) ↔ Database (MongoDB).
  • Client and server communicate via REST APIs.
  • Server handles authentication, content management, and shareable link generation.
  • Stateless JWT authentication ensures secure session management.

Technology Stack

Client:

CategoryTechnologyPurpose
FrameworkReact 18UI library
LanguageTypeScript 5Type safety
StylingTailwind CSS 4Styling
RoutingReact Router DOM 7Client-side routing
HTTP ClientAxios 1API requests

Server:

CategoryTechnologyPurpose
RuntimeNode.jsServer runtime
FrameworkExpress.jsREST API server
DatabaseMongoDBDocument database
ODMMongooseObject modeling
AuthenticationjsonwebtokenJWT tokens
Password HashingbcryptSecure passwords
ValidationZodSchema validation

Project Structure

Snip-Shell/
├── client/
│ ├── src/
│ │ ├── App.tsx # Routes
│ │ ├── main.tsx # Entry point
│ │ ├── pages/ # Pages (Home, Dashboard, SharedView, Error)
│ │ ├── layout/ # Layout components (Header, Hero, Sidebar, Footer)
│ │ ├── components/ # Reusable UI (Card, Modal)
│ │ ├── context/ # React Context (AuthContext, AddContext)
│ │ └── assets/ # Static assets
│ ├── package.json
│ └── vite.config.ts
└── server/
├── src/
│ ├── controllers/logic.ts # Main business logic
│ ├── model/userdb.ts # Mongoose models
│ ├── schema/user.ts # Zod validation schemas
│ ├── middleware/ # Express middleware
│ └── config.ts # Configuration constants
└── package.json

Authentication & Security

  • JWT-based authentication.
  • Password hashing with bcrypt.
  • Route protection using ProtectedRoute component.
  • Content queries filtered by userId.
  • Request validation using Zod schemas.

Content Types

  • url: Generic web links
  • twitter: Embedded Twitter posts
  • youtube: Embedded YouTube videos

Each content item includes: title, link, type, description, userId, tags[].


Getting Started

  1. Clone the repository
git clone https://github.com/nikhil008-git/Snip-Shell.git
  1. Install dependencies
# Clientcd Snip-Shell/client
npm install
# Servercd ../server
npm install
  1. Configure environment variables
  • Create a .env in server/ with MongoDB URI, JWT secret, and other configs.
  1. Run the application
# Server
npm run dev
# Client
npm run dev
  1. Access the app
  • Client: http://localhost:5173
  • Server API: http://localhost:3000/api

About

Snip-Shell : The Second Brain

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages