Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

Secure File Sharing System

A cloud-based secure file sharing system built with MERN stack and AWS services.

Features

  • User Authentication & Authorization (JWT)
  • Secure File Upload & Download (AWS S3)
  • Access Control (Public/Private links)
  • Audit Logging
  • Background Processing (RabbitMQ)
  • Rate Limiting (Redis)

Tech Stack

  • Backend: Node.js, Express.js
  • Frontend: React.js
  • Database: AWS DynamoDB
  • Storage: AWS S3
  • Message Queue: RabbitMQ
  • Cache: Redis
  • Authentication: JWT

Prerequisites

  • Node.js >= 14.x
  • AWS Account with S3 and DynamoDB access
  • RabbitMQ Server
  • Redis Server
  • MongoDB (for user sessions)

Project Structure

.
├── backend/                 # Express backend
│   ├── src/
│   │   ├── controllers/    # Route controllers
│   │   ├── middleware/     # Custom middleware
│   │   ├── models/        # Data models
│   │   ├── routes/        # API routes
│   │   ├── services/      # Business logic
│   │   └── utils/         # Utility functions
│   └── config/            # Configuration files
└── frontend/              # React frontend
    ├── src/
    │   ├── components/    # React components
    │   ├── pages/        # Page components
    │   ├── services/     # API services
    │   └── utils/        # Utility functions
    └── public/           # Static files

Setup Instructions

Backend Setup

  1. Navigate to the backend directory:

    cd backend
  2. Install dependencies:

    npm install
  3. Create a .env file with the following variables:

    PORT=5000
    NODE_ENV=development
    
    # AWS Configuration
    AWS_ACCESS_KEY_ID=your_access_key
    AWS_SECRET_ACCESS_KEY=your_secret_key
    AWS_REGION=your_region
    S3_BUCKET_NAME=your_bucket_name
    
    # JWT Configuration
    JWT_SECRET=your_jwt_secret
    JWT_EXPIRE=24h
    
    # RabbitMQ Configuration
    RABBITMQ_URL=amqp://localhost
    
    # Redis Configuration
    REDIS_URL=redis://localhost
    
  4. Start the backend server:

    npm run dev

Frontend Setup

  1. Navigate to the frontend directory:

    cd frontend
  2. Install dependencies:

    npm install
  3. Create a .env file with the following variables:

    REACT_APP_API_URL=http://localhost:5000/api
    
  4. Start the frontend development server:

    npm start

API Documentation

The API documentation can be found at /api-docs when running the backend server.

Security Features

  • JWT-based authentication
  • File encryption at rest
  • Secure file sharing with expiring links
  • Rate limiting to prevent abuse
  • Access control and audit logging
  • CORS protection
  • Request validation
  • XSS protection

Contributing

  1. Fork the repository
  2. Create your feature branch
  3. Commit your changes
  4. Push to the branch
  5. Create a new Pull Request

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages