Skip to content

Secure & Encrypted Code Sharing πŸ”’πŸš€

License

Notifications You must be signed in to change notification settings

Suhaib3100/devsync

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

24 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

DevSync - Encrypted Code & Text Sharing

Architecture

Overview

DevSync is a secure and encrypted code/text-sharing platform designed for developers and teams. Built with a layered architecture, it ensures privacy, real-time access, and efficient handling of data.

πŸ— Architecture Overview

The system is designed using a modular approach with different layers handling specific responsibilities.

1️⃣ User Interaction Layer

  • Next.js UI – Modern, responsive frontend for user interaction.
  • Form Validation – Ensures proper input before submission.
  • API Call Handling – Manages communication with the backend.

2️⃣ API Gateway

  • Middleware – Processes incoming requests.
  • Request Processing – Handles incoming API calls.
  • Authentication – Secure access control.
  • Rate Limiting – Prevents abuse and excessive usage.

3️⃣ Business Logic Layer

  • Data Validation – Ensures data integrity before storing.
  • Storage Logic – Manages how data is written to the database.
  • Retrieval Logic – Handles fetching of stored data.
  • Optional Encryption – Encrypts stored snippets for enhanced security.

4️⃣ Database Layer

  • PostgreSQL – Stores encrypted text/code snippets.
  • Schema:
    • Key – Unique identifier for each snippet.
    • Text – Encrypted or raw text data.
    • Created_at – Timestamp of snippet creation.
    • Expiration_time – Auto-deletion schedule for snippets.

5️⃣ Security Layer

  • Input Sanitization – Prevents SQL injection and XSS attacks.
  • Logging & Monitoring – Tracks system activity for security and debugging.

6️⃣ Background Jobs

  • Expiry System – Removes expired snippets automatically.
  • Alerts & Logs – Monitors system health and security events.

πŸš€ Features

βœ… End-to-End Encryption for private sharing
βœ… Self-destructing Snippets with expiration controls
βœ… Real-time API for developers
βœ… Secure & Scalable PostgreSQL Backend

πŸ“œ How It Works

  1. User submits code/snippet via the Next.js UI.
  2. The API Gateway authenticates and processes the request.
  3. The Business Logic Layer validates and optionally encrypts data.
  4. Snippet is stored securely in PostgreSQL with an expiration time.
  5. Expired snippets are deleted automatically via background jobs.

πŸ“Œ Setup

To deploy DevSync, follow these steps:

git clone https://github.com/Suhaib3100/DevSync.git
cd DevSync
docker-compose up -d

πŸ›  Tech Stack

  • Frontend: Next.js
  • Backend: Node.js, Express.js
  • Database: PostgreSQL
  • Security: JWT Authentication, Input Sanitization
  • Hosting: Docker, Cloud Deployment

🀝 Contributing

Contributions are welcome! Feel free to open an issue or submit a pull request.

πŸ“„ License

This project is licensed under the MIT License.

About

Secure & Encrypted Code Sharing πŸ”’πŸš€

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published