Loading repository data…
Loading repository data…
hussein-m-kandil / repository
A "stripped-down" version of personal storage service, and a an example of using the "PostgreSQL Recursive Query". Built as part of studying The Odin Project's Node.js course.
A transparent discovery signal based on current public GitHub metadata.
This score does not audit code, security, maintainers, documentation quality, or suitability. Verify the repository and its current documentation before adoption.
A stripped-down version of a personal storage service. Built as part of studying The Odin Project's Node.js course.
Note: I deliberately minimized the project's UI, so I can focus on practicing the back-end technologies I am studying.
While this project introduced me to many new concepts, the most significant aspect I implemented was the parent-child relationship between files in the database. Check out the files controller for an implementation of raw, recursive queries in PostgreSQL.
Note: These requirements were copied from The Odin Project's website at the time of building this project.
Set up a new project using Express and Prisma. Install all the necessary dependencies including Passport etc.
Set up session based authentication using Passport.js. Use the Prisma session store library to persist sessions in the database.
Add a form where authenticated users can upload a file. Save the file in your filesystem for now. You’ll need to integrate the multer middleware. We’ll upload these files once we have all other features working.
Add folders. Users should be able to CRUD folders and upload files in them. Set up routes and necessary database interactions for this.
Add a route to view specific file details like name, size, and upload time. There should be a download button to allow users to download the file.
Finally, add logic to upload files. You could store it in a database, but it’s advised to use a cloud storage service for this use case. You can use Cloudinary or Supabase storage. When a file is uploaded, save the file URL in the database.
https://odin-file-uploader-hussein-kandil.vercel.app/share/70c353d8-8767-4b52-a5a2-389dfb1f7fc8