2025-05-20 13:14:01 +02:00
2025-05-20 12:10:52 +02:00
2025-05-20 13:10:37 +02:00
2025-04-14 08:45:45 +02:00
2025-04-14 12:23:16 +02:00
2025-04-14 15:46:17 +02:00
2025-04-14 15:46:17 +02:00
2025-04-12 23:32:29 +02:00
2025-05-20 13:10:37 +02:00
2025-05-20 13:10:37 +02:00
2025-04-12 23:32:29 +02:00
2025-04-12 23:32:29 +02:00
2025-04-12 23:32:29 +02:00
2025-05-20 12:10:52 +02:00

File Hosting App

This is a T3 Stack project. It provides a file hosting service where users can upload, download, and manage files.

Features

  • User authentication with NextAuth.js
  • File upload and download using MinIO
  • File metadata management with Prisma
  • Real-time updates using Server-Sent Events (SSE)
  • Responsive UI built with Tailwind CSS

Technologies Used

API Documentation

Download File

Endpoint: /api/files/download

Method: GET

Query Parameters:

  • fileId (required): The ID of the file to download.
  • fileName (required): The name of the file to download.

Response:

  • 200 OK: Returns the file as a binary stream.
  • 400 Bad Request: If fileId or fileName is missing.
  • 404 Not Found: If the file does not exist.
  • 500 Internal Server Error: If there is an error fetching the file.

Serve File

Endpoint: /api/files/serv

Method: GET

Query Parameters:

  • id (required): The ID of the file to serve.

Response:

  • 200 OK: Returns the file as a binary stream with the appropriate MIME type.
  • 400 Bad Request: If id is missing.
  • 404 Not Found: If the file does not exist.
  • 500 Internal Server Error: If there is an error fetching the file.

List Files

Endpoint: /api/files

Method: GET

Response:

  • 200 OK: Returns a list of files with metadata.
  • 500 Internal Server Error: If there is an error fetching the files.

Real-Time Updates

Endpoint: /api/files/stream

Method: GET

Response:

  • 200 OK: Streams real-time updates for file additions and removals.

How to Run Locally

  1. Clone the repository:
    git clone https://github.com/your-username/file-hosting.git
    cd file-hosting
    npm install
    npm run build
    npm run start
    
Description
No description provided
Readme 11 MiB
Languages
TypeScript 55.4%
JavaScript 41.2%
Shell 2%
Dockerfile 1.1%
CSS 0.3%