Create an API that serves as an cloud backup system
- Users can create an account with:
- email address
- password
- full name
- Users can upload files up to 200mb
- Users can download uploaded files
- Users can create folders to hold files
- An admin user type for managing the content uploaded
- Admins can mark pictures and videos as unsafe
- Unsafe files automatically get deleted
- Users can stream videos and audio
- Compression
- File History
- Revokable session management
- Multiple admin reviews before file is deleted
At minimum you must implement everything in simple mode. You're free to pick and choose what else you implement along side it. The harder the task, the better your chances. Though make sure to finish the Simple Mode first.
- NodeJs (TypeScript & Express) or Golang
- Postgres for pure data
- Redis
- Docker
- Postman
- S3 or any other shared cloud storage provider
Unit tests are a must, submissions without tests will be ignored.
7 days
- Your API endpoints should be well documented in POSTMAN.
- Code should be hosted on a git repository, Github preferably.
- The API should be hosted on a live server (e.g. https://heroku.com)
- Your app should be
containerized
usingdocker
. - Share with us through email the:
- Repository
- Hosted API URL
- Postman Collection
- A list of tasks you did beyond Simple Mode
To run the app locally, follow the steps below:
-
Clone the repository to your PC using your terminal. For more info, refer to this article
-
After cloning, navigate into the repo using:
cd backend-test
-
Install the dependencies in the yarn.lock using the command:
yarn
-
After the dependencies have been installed successfully, create a .env file at the root. Take a look at the env.sample file and configure your environment variables with your values in the .env file.
NOTE: All test files should have a .test.ts
file extension.
All tests for a route or controller should be placed in a _tests_
folder relative to the folder it resides in.
For example, if you had a authController.ts
file located in controllers/auth
, and your tests are in a authController.test.ts
file, do the following:
-
Create a
_tests_
folder in thecontrollers/auth
folder -
Move the
authController.test.ts
file to the_tests_
folder -
To run test
yarn run test
The file structure would look similar to this:
.
├── controllers
│ └── auth
│ ├── authController.ts
│ └── _tests_
│ └── authController.test.ts