https://github.com/ido-pluto/movement-home-assignment
Simple API Server to manage user collection
https://github.com/ido-pluto/movement-home-assignment
Last synced: 12 months ago
JSON representation
Simple API Server to manage user collection
- Host: GitHub
- URL: https://github.com/ido-pluto/movement-home-assignment
- Owner: ido-pluto
- Created: 2024-01-28T19:44:31.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-01-29T09:14:35.000Z (over 2 years ago)
- Last Synced: 2025-03-15T10:11:18.133Z (over 1 year ago)
- Language: TypeScript
- Size: 30.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Home Assignment
Create a simple API to manage a user collection.
### Application Structure
- api/routes/account
- auth.ts
- auth.controller.ts
- auth.model.ts
- user.ts
- user.controller.ts
- user.model.ts
- database
- collection/account.ts
- populateDB.ts
### Auth route
Create a user authenticated to access the `users` API.
Authentication is done using JWT (JSON Web Token).
### Users route
API to manage a user collection.
You must be authenticated to access this API.
### Application Stack
- Express
- Mongoose
- Typescript
## Database
The database is MongoDB. On the first load of the application it will fetch the first 10 pages from the [reqres.in](https://reqres.in).
## WebUI
Simple HTML page to interact with the API available at `https://localhost/`
## Running the project
#### Directly
Make sure you have MongoDB installed and running on your machine.
```bash
npm install
npm run build
npm run start # with sudo if you using unix based system (port 443)
```
#### Docker
```bash
docker-compose up
```