Indego station + Open Weather Map
-
Go to this url with token
-
Click here!
- Set Token
(For demo server, Token 8cfb7171617589b8e7bd06c328f921a7697133bd
)
- Enjoy!
- Initial set up
docker-compose build
docker-compose run web python manage.py createsuperuser
docker-compose run web python manage.py drf_create_token <username>
- Run server
docker-compose up
- Go to
http://0.0.0.0:3000/api/schema/swagger-ui/
- Python
- Django / Django REST framework
- Djongo (Object Document Mapper)
- MongoDB
- drf-spectacular (Swagger doc auto generation)
- Requirement clarification (Request volume, ambiguas specification, hosting preference)
- For minimum requiements
- Token Authentication
- Implement 3 endpoints as the challenge describes
- Use MongoDB with proper indexes and unique constraints
- Unit tests for mainly validations and Functional tests for APIs (30 tests for 96% coverage)
- Hosting to an instance of AWS EC2
- API documentation using Swagger
- Extras
- Application-level transaction-like implemenation
- Return Error codes with custom error classes for front end error handling
- Page cache for GET 2 endpoints
- Use Linter auto correct
- Setup CI(CircleCI for testing, CodeCov for coverage)
- No user registration, no new token generation, no token expiration
- No database-level transactions (I need to pay for Djongo or implement ODM by myself)
- Environment variables are hard coded in Dockerfile
- No proper production server(https, DNS, load-balancing, separated DB servers, logging, monitoring, proper env variables handling, Same/Cross-origin policy, etc...)
- No deployment automation
- Models
- Serializers
- Views
- Tests
- Common
- Others(less important)
- Django setting https://github.com/shirakia/indegother/blob/main/config/settings.py
- urls https://github.com/shirakia/indegother/blob/main/config/urls.py
- Dockerfile https://github.com/shirakia/indegother/blob/main/Dockerfile
- docker-compose.yml https://github.com/shirakia/indegother/blob/main/docker-compose.yml
- circleci conf https://github.com/shirakia/indegother/blob/main/.circleci/config.yml