Developer Challenge
Context and Problem Statement
WebSecureLog is an non profit organization that provides encryption services. They want to revamp their encryption service with modern technologies. Biuld a full stack application that encrypts and decrypts payloads while providing searchable logs to past requestsrequests.
Requirements
RequirementsUI
GUI
Create
a React webpageapplication with the ability to do the following:
-
Enter an encryption key and a payload, call this service's API, log the request, and display the encrypted data
-
Enter a decryption key and a payload, call this service's API, log the request, and display the decrypted data
-
Paginated view of past requests
Our evaluation will not only be based on the design and layout of the application. However, we are looking for good UX and error handling.
API
Create a FastAPI Pythonor SpringBoot API that meets the following details:
-
POST /api/v1/encrypt
-
Accept a JSON object containing { key: str, data: str }
-
Respond with { data: str } where data is the resulting encrypted data from signing the data with the public key
-
POST /api/v1/decrypt
-
Accept a JSON object containing { key: str, data: str } where key is a private key and data is some encrypted data from private key's keypair
-
Respond with { data: str } where data is the resulting data from decrypting the payload with the private key
-
GET /api/v1/logs
-
Paginate logs of requests made to this service, include two URL parameters: size (log count) and offset (number of logs from the beginning)
-
Logs should be of the following type { id: str, timestamp: datetime, ip: str, data: str }
-
ID should be a UUID
-
Note that datetime should be a UNIX timestamp
-
The response of this endpoint should be a collection of logs
Data
PostgreSQL should be used to store logs. Logs should match the format defined in the API section.
Documentation
The
Meaningfulapplication documentationas a whole should be providedcontainerized. detailingUse bothdocker-compose setto spin up an instance of PostgresSQL and architecture
Containerization
This should be containerized with Docker, the project should includecreate a Dockerfile &to docker-compose.yamlbuild file
CI
image of your API. Include a linter workflow for both the web and server in your repositoryrepository.
Conventions
Using
Languagegithub actions include a linter workflow for the front-end and toolingbackend. conventionsThe action should be followedtriggered on every push.
Submission Guidelines
- Github repository link. The repo should contain both the frontend and backend (Remember to make it public so we can access)
- Deployed URL (optional, bonus): Deploy your app in AWS or any other provider of your choice.
- Add a README.md that includes installation and development instructions. A brief overview of how the application works. Bonus points if you include an architecture diagram.
- The repository should contain a docker-compose.yaml to run the full stack application (web + api + db), and a Dockerfile for the frontend and backend.
- .github/workflows/web-lint.yml and .github/workflows/server-lint.yml
- Repository structure
.github/workflows/
web-lint.yml
server-lint.yml
README.md
docker-compose.yml
web/
package.json
package-lock.json
src/
Dockerfile
server/
src/
Dockerfile
SUBMISSION DEADLINE: October 10th @ 11:59 PM