I used this when I didn't have discord nitro, so I could send files to discord even if I exceeded the file size limit
StorageDS#
StorageDS is a platform for temporary file storage, developed using Mustache, Node.js, Express, Typescript, PostgreSQL, and AWS S3. You can access the fullstack application here. For the source code, please visit the Git Repo.
Overview#
StorageDS allows users to temporarily store files securely. It features dynamic frontend development using the Mustache Engine and robust backend integration with Node.js and AWS S3 for scalable file storage. Additionally, PostgreSQL is used for database management, and file flow control is achieved with Lifecycle present in the S3 Bucket.
Technologies Used#
Frontend:
- Mustache Engine
- Dynamic frontend development
Backend:
- Node.js
- Express
- Typescript
Database:
- PostgreSQL
File Storage:
- AWS S3
- File flow control with Lifecycle in S3 Bucket
Project Structure#
The project consists of several main components:
Frontend:
- Dynamic frontend development using the Mustache Engine.
- Static assets are served using Express and stored in the
publicdirectory.
Backend:
- Built with Node.js and Express.
- Utilizes Typescript for improved maintainability and scalability.
- Endpoints for file upload, retrieval, and deletion are defined in the
routesfolder. - Middleware for handling file upload validation and error handling.
Database:
- PostgreSQL is used to manage data related to file uploads, user sessions, etc.
File Storage:
- AWS S3 integration for scalable file storage.
- Utilizes AWS SDK to interact with S3 buckets.
- Lifecycle policies are implemented for efficient file flow control.
How to Run Locally#
Clone the Repository:
git clone git_repo_link_here cd project_directoryInstall Dependencies:
npm installSet Environment Variables:
- Ensure you have the necessary environment variables set up, including those required for AWS S3, PostgreSQL connection, etc. Refer to the
.env.examplefile for guidance.
- Ensure you have the necessary environment variables set up, including those required for AWS S3, PostgreSQL connection, etc. Refer to the
Run the Application:
npm startAccess the Application:
- Once the application is running locally, you can access it via your web browser at the specified port.
Endpoints#
Upload File:
POST /upload: Endpoint to upload files. Middleware ensures file validation and error handling.
Remove File:
GET /remove/:id: Endpoint to delete a file based on its ID.
View File:
GET /media/:id: Endpoint to view/download a file based on its ID.
Conclusion#
StorageDS provides a reliable platform for temporary file storage, leveraging modern technologies such as Mustache, Node.js, Express, PostgreSQL, and AWS S3. Whether you’re looking to store images, videos, or other files securely, StorageDS has you covered.
