Skip to content

Bilalnasir057558/SyncScript

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

231 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

SyncScript - Knowledge Vault Management System

Organize. Collaborate. Learn. All in one place.

β€’ Features β€’ Tech Stack β€’ Documentation


πŸ“š Overview

SyncScript is a modern, full-stack web application designed for individuals and teams to create, organize, and collaborate on knowledge vaults. Whether you're a student managing study materials, a researcher organizing citations, or a team documenting project resources, SyncScript provides an intuitive platform to centralize your learning resources with collaborative features.

Users can create personal vaults, add resources (links and files), annotate with rich text, and securely share vaults with team members through role-based access control. The system features email-based invitations, comprehensive permission management, and a responsive design that works seamlessly across all devices.


🌟 Key Features

Knowledge Organization

  • πŸ“¦ Create unlimited personal knowledge vaults
  • πŸ“š Organize resources by topic, subject, or project
  • 🏷️ Add descriptive names and detailed descriptions to vaults
  • πŸ“Š View vault statistics (resource count, creation date)

Resource Management

  • πŸ”— Add links/URLs with titles and descriptions
  • πŸ“ Upload and manage files within vaults
  • 🎯 Quick access with organized resource lists
  • πŸ” Easy navigation to view resource details

Rich Annotations

  • ✍️ Create detailed annotations using TinyMCE rich text editor
  • 🎨 Format text with bold, italic, lists, links, and more
  • πŸ‘₯ Multiple users can annotate the same resource
  • ⏰ Track annotation timestamps and authors

Team Collaboration

  • πŸ‘€ Share vaults with team members via email invitations
  • πŸ” Role-based access control (Owner, Contributor, Viewer)
  • πŸ“§ Email-based invitation system with secure tokens
  • βš™οΈ Granular permission management
    • Owner: Full control over vault and members
    • Contributor: Add resources and annotations, edit own content
    • Viewer: Read-only access to resources and annotations

User Authentication

  • πŸ” Secure JWT-based authentication
  • πŸ”’ Password hashing with bcryptjs
  • πŸ’Ύ Session persistence across browser sessions
  • πŸš€ Auto-login functionality

Responsive Design

  • πŸ“± Mobile-first responsive layout
  • πŸ’» Works seamlessly on desktop, tablet, and mobile
  • ⚑ Fast loading with optimized assets
  • 🎯 Intuitive user interface

πŸ› οΈ Tech Stack

Frontend

  • React 18 - UI component framework
  • Vite - Lightning-fast build tool
  • TailwindCSS - Utility-first CSS framework
  • React Router v6 - Client-side routing
  • Axios - HTTP client for API communication
  • TinyMCE - Rich text editor for annotations
  • Lucide React - Icon library

Backend

  • Node.js + Express.js - Server runtime and web framework
  • MongoDB + Mongoose - NoSQL database and ODM
  • JWT - Stateless authentication
  • bcryptjs - Password hashing
  • Nodemailer - Email service for invitations
  • CORS - Cross-origin resource sharing
  • Express Middleware - Logging, error handling, validation

Deployment

  • Frontend: Vercel (serverless)
  • Backend: Railway/Render (container deployment)
  • Database: MongoDB Atlas (cloud)

πŸ“‹ Project Structure

SyncScript/
β”œβ”€β”€ frontend/                          # React frontend application
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ components/                # Reusable React components
β”‚   β”‚   β”‚   β”œβ”€β”€ VaultCard.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ CreateVaultModal.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ InviteMemberForm.jsx
β”‚   β”‚   β”‚   └── ResourceForm.jsx
β”‚   β”‚   β”œβ”€β”€ pages/                     # Page components
β”‚   β”‚   β”‚   β”œβ”€β”€ LandingPage.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ SignupPage.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ LoginPage.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ DashboardPage.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ VaultDetailPage.jsx
β”‚   β”‚   β”‚   └── AcceptInvitationPage.jsx
β”‚   β”‚   β”œβ”€β”€ api/                       # API integration
β”‚   β”‚   β”‚   └── axios.js
β”‚   β”‚   β”œβ”€β”€ App.jsx                    # Main app component with routing
β”‚   β”‚   └── main.jsx                   # React entry point
β”‚   β”œβ”€β”€ package.json
β”‚   └── vite.config.js
β”‚
β”œβ”€β”€ backend/                           # Node.js backend application
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ controllers/               # Business logic
β”‚   β”‚   β”‚   β”œβ”€β”€ authController.js
β”‚   β”‚   β”‚   β”œβ”€β”€ vaultController.js
β”‚   β”‚   β”‚   β”œβ”€β”€ resourceController.js
β”‚   β”‚   β”‚   └── annotationController.js
β”‚   β”‚   β”œβ”€β”€ models/                    # MongoDB schemas
β”‚   β”‚   β”‚   β”œβ”€β”€ User.js
β”‚   β”‚   β”‚   β”œβ”€β”€ Vault.js
β”‚   β”‚   β”‚   β”œβ”€β”€ Resource.js
β”‚   β”‚   β”‚   β”œβ”€β”€ Annotation.js
β”‚   β”‚   β”‚   β”œβ”€β”€ VaultMember.js
β”‚   β”‚   β”‚   └── Invitation.js
β”‚   β”‚   β”œβ”€β”€ routes/                    # API endpoints
β”‚   β”‚   β”‚   β”œβ”€β”€ auth.routes.js
β”‚   β”‚   β”‚   β”œβ”€β”€ vault.routes.js
β”‚   β”‚   β”‚   β”œβ”€β”€ resource.routes.js
β”‚   β”‚   β”‚   └── annotation.routes.js
β”‚   β”‚   β”œβ”€β”€ middleware/                # Custom middleware
β”‚   β”‚   β”‚   β”œβ”€β”€ authMiddleware.js
β”‚   β”‚   β”‚   β”œβ”€β”€ errorHandler.js
β”‚   β”‚   β”‚   └── validation.js
β”‚   β”‚   β”œβ”€β”€ utils/                     # Utility functions
β”‚   β”‚   β”‚   β”œβ”€β”€ emailService.js
β”‚   β”‚   β”‚   └── storage.js
β”‚   β”‚   └── index.js                   # Server entry point
β”‚   β”œβ”€β”€ .env.example
β”‚   β”œβ”€β”€ package.json
β”‚   └── README.md
β”‚
└── docs/                              # Project documentation
    β”œβ”€β”€ DATABASE.md                    # Database schema
    β”œβ”€β”€ API.md                         # API documentation
    └── DEPLOYMENT.md                  # Deployment guide

πŸ“– Quick Start

Prerequisites

  • Node.js 18+
  • npm or yarn
  • MongoDB connection string (MongoDB Atlas)
  • Gmail account for email service (or alternative)

πŸ”Œ API Endpoints

Authentication

POST   /api/v1/users/register      - User registration
POST   /api/v1/users/login         - User login
POST   /api/v1/users/logout        - User logout
POST   /api/v1/users/refresh-token - Refresh JWT token
GET    /api/v1/users/me            - Get current user

Vaults

POST   /api/v1/vaults              - Create vault
GET    /api/v1/vaults              - Get all user vaults
GET    /api/v1/vaults/:id          - Get single vault
PUT    /api/v1/vaults/:id          - Update vault
DELETE /api/v1/vaults/:id          - Delete vault

Resources

POST   /api/v1/vaults/:id/resources       - Add resource
GET    /api/v1/vaults/:id/resources       - Get vault resources
PUT    /api/v1/resources/:id              - Update resource
DELETE /api/v1/resources/:id              - Delete resource

Annotations

POST   /api/v1/resources/:id/annotations  - Add annotation
GET    /api/v1/resources/:id/annotations  - Get annotations
PUT    /api/v1/annotations/:id            - Update annotation
DELETE /api/v1/annotations/:id            - Delete annotation

Vault Members & Sharing

POST   /api/v1/vaults/:id/invite         - Send vault invitation
POST   /api/v1/invitations/:token/accept - Accept invitation
GET    /api/v1/vaults/:id/members        - Get vault members
DELETE /api/v1/vaults/:id/members/:id    - Remove member

πŸ” Security Features

  • βœ… JWT Authentication - Stateless, scalable auth
  • βœ… Password Hashing - bcryptjs with salt rounds
  • βœ… CORS Protection - Restricted cross-origin requests
  • βœ… Role-Based Access Control - Granular permissions
  • βœ… Email Verification - Token-based invitations
  • βœ… HTTPS Only - Encrypted data in transit
  • βœ… Environment Variables - No hardcoded secrets
  • βœ… Rate Limiting - Prevent brute force/abuse
  • βœ… Input Validation - Server-side validation
  • βœ… Error Handling - Secure error messages

πŸ“Š Database Schema

SyncScript uses a normalized MongoDB schema with 7 collections:

Collections

  • Users - User accounts and credentials
  • Vaults - Knowledge vaults created by users
  • Resources - Links and files within vaults
  • Annotations - Rich text notes on resources
  • VaultMembers - User-vault relationships with roles
  • Invitations - Pending/accepted vault sharing invitations
  • Files - Uploaded file metadata

πŸ™ Acknowledgments

This project was developed as part of the Software Construction and Development course at NED University of Engineering and Technology. Special thanks to:

  • Course instructors for guidance
  • Classmates for feedback and testing
  • Open source communities for amazing tools and libraries

πŸ“Š Project Statistics

  • Lines of Code: ~2,500 (frontend) + ~3,000 (backend)
  • Components: 8 (frontend)
  • API Endpoints: 25+
  • Database Collections: 7
  • Test Cases: 33+
  • Documentation Pages: 5
  • Development Time: ~8 weeks
  • Deployment Platforms: 3 (Vercel, Railway, MongoDB Atlas)

πŸŽ“ Learning Outcomes

By exploring SyncScript, you'll learn:

  • Full-stack web development with React + Node.js
  • Database design and normalization (1NF to BCNF)
  • RESTful API design and implementation
  • Authentication and authorization patterns
  • Cloud deployment and DevOps basics
  • Real-time email-based collaboration
  • Role-based access control implementation
  • Production-ready code practices
  • Git workflow and version control
  • Responsive mobile-first design

πŸ’‘ Future Roadmap

Priority Feature Target Status
High Search & Filter v1.1 πŸ”„ In Progress
High Dark Mode v1.1 πŸ“‹ Planned
Medium Tags/Categories v1.2 πŸ“‹ Planned
Medium Activity Logs v1.2 πŸ“‹ Planned
Low Mobile App v2.0 🎯 Future
Low Real-time Sync v2.0 🎯 Future

Made with ❀️

⭐ If you find this project useful, please consider starring it!

⬆ Back to Top


πŸ“ž Questions?

Feel free to open an issue or reach out directly. Happy learning! πŸš€

Releases

No releases published

Packages

 
 
 

Contributors