0% found this document useful (0 votes)
14 views4 pages

Junior FullStack Developer API Task

The assignment requires the development of a REST API for a package management system for the Repsy programming language, including deployment and download endpoints. The solution must be a Spring Boot application with PostgreSQL for data storage, and it should implement two storage strategies (file-system and object-storage). Deliverables include a GitHub repository, Spring Boot application code, and libraries, all to be completed within 5 working days.

Uploaded by

Furkan Yıldız
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views4 pages

Junior FullStack Developer API Task

The assignment requires the development of a REST API for a package management system for the Repsy programming language, including deployment and download endpoints. The solution must be a Spring Boot application with PostgreSQL for data storage, and it should implement two storage strategies (file-system and object-storage). Deliverables include a GitHub repository, Spring Boot application code, and libraries, all to be completed within 5 working days.

Uploaded by

Furkan Yıldız
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Junior FullStack Developer Assignment

Summary
We want you to deliver a REST API Implementation for an imaginary software package system.

Story
Repsy programming language compiler creates a single output file. This generated package can
be used by other programs as a dependency library.

-​ [Link]

It’s similar to java jar files. Our package manager rep is a client for deploying those rep
packages to a remote repository. You’re responsible for creating a minimalistic repository
system for the Repsy programming language. For this purpose we expect you to develop:

-​ A deployment REST endpoint


-​ A download REST endpoint
-​ 2 Storage Strategy libraries

Deployment REST endpoint

/{packageName}/{version}

This endpoint is responsible for welcoming the uploaded files. 2 different files can be uploaded
to this repository:

-​ [Link]
-​ [Link]

[Link] is a binary file which is under the hood a .zip file. Which contains the required
compiled sources code. [Link] is a metafile which gives additional information about the
uploaded [Link] rest endpoint can only accept the valid content, the rest must be
rejected.

Example [Link]:
{
"name": "mypackage",
"version": "1.0.0",
"author": "John Doe",
"dependencies": [
{
"package": "even",
"version": "3.4.7"
}, {
"package": "math",
"version": "4.2.8"
}, {
"package": "std",
"version": "1.2.0"
}, {
"package": "repsy",
"version": "1.0.3"
}, {
"package": "client",
"version": "3.3.0",
}
]
}

Implementation note: You can validate the metafile and persist the package data into a
database but no need to do additional stuff with metadata itself like checking the existence of
dependencies.

All deployed packages and metafiles should be stored in a chosen storage layer. So they can be
downloaded with Download REST endpoint.

Download REST endpoint


Download REST endpoint is responsible for fetching the content of the data

/{packageName}/{version}/{fileName}
Storage Layer
Files can be stored either in a filesystem storage or an object storage. So we are expecting a
flag in [Link] which can be overridden by an environment variable. Storage
strategy and required other variables need to be configured.

storageStrategy: object-storage | file-system

You need to implement 2 different java libraries for storage strategy.

Acceptance Criteria

-​ The solution should be a spring boot web application with REST API written in Java LTS
version
-​ The solution should provide only 2 REST endpoints for the “deployment” and “download”
operations.
-​ The solution should use a postgresql database for keeping track of the deployed
packages.
-​ Object storage implementation can be implemented using a minio server.
-​ The solution should contain descriptive documentation in a README file.
-​ The solution should be developer friendly. We don’t need to install all required
applications like databases and object storage servers one by one.
-​ The solution should follow the software engineering best practices, SDLC, and API
guidelines, response codes and http methods.
-​ The solution should be provided as a public GitHub repository with a proper Git commit
history.
-​ There should be 2 separate storage layer libraries which support basic write and read
operations. Libraries must be deployed to Respy.
-​ Ensure the application is robust against invalid input.

Expected Deliverables
-​ 1 Github repository
-​ 1 SpringBoot Web Application Code
-​ 2 Storage Layer Strategy Pattern library code
-​ file-system
-​ Object-storage
-​ Libraries must be deployed to Repsy private maven repo and Spring boot application
should use it from Repsy
-​ Spring Boot application must be a docker container which is deployed to a public Respy
repository.

Time and Delivery Expectations


-​ This task is categorized as small (S-size) and should not exceed 3 hours of work.
-​ Please deliver your solution within 5 working days.

Out of Scope
The following items should be excluded:
-​ REST API should be a public API and no security restrictions should be applied.
-​ Do not develop a frontend interface.
-​ .rep files can be any zip file with .rep file extension. No need to check the content of .rep
files.

Next Steps
Please send your completed solution to contact@[Link] address. Upon submission, we will
promptly review your solution. If it meets our criteria, you will be invited to a 1-1.5 hour online
interview session to discuss:
-​ Your submitted solution
-​ A straightforward live coding challenge
-​ An assessment of your technical and soft skills

If you don’t get a response within 5 days. That means we proceeded with other candidates.

How will we test your assignment?


First, we will run the docker container you have provided. So please be sure it’s deployed to a
Repsy public docker repository and then we will try to deploy and download several packages to
your solution. We will test against invalid inputs and will check the API guideline. If everything is
fine then we will check your code and libraries.

Contact Information
Note: If you encounter any issues or have questions regarding the assignment, please don’t
hesitate to reach out us at contact@[Link]

Disclaimer: This assignment is intended solely for the recipient and may contain confidential
information. Unauthorized use, sharing, or copying of this document is strictly prohibited.

Common questions

Powered by AI

Adhering to software engineering best practices affects delivery and deployment by ensuring the final solution is reliable, efficient, and easy to maintain. It leads to a solution that is not only robust and production-ready but also aligns with industry standards, making it easier to integrate, scale, and extend as needed. This adherence promotes better collaboration, facilitates continuous improvement, and helps avoid technical debt .

The assignment emphasizes practices like using a standardized API with proper response codes and HTTP methods, following software development lifecycle (SDLC) guidelines, comprehensive documentation, and maintaining a clear Git commit history. These best practices are important as they ensure maintainability, scalability, and readability of the codebase, promote collaborative development efforts, and make the process efficient and transparent to all stakeholders involved .

The API should handle invalid inputs gracefully by validating input data and returning appropriate response codes and error messages. This robustness is critical for preventing unintentional system crashes or unpredictable behavior, thus ensuring reliability and maintaining trust with users by providing clear, actionable feedback when inputs do not meet expected criteria .

Storing package data in a PostgreSQL database requires considerations related to schema design, indexing for performance, transaction management for data integrity, and provisioning for scalability. Choosing PostgreSQL supports deployment by offering a robust, feature-rich relational database system known for reliability, scalability, and performance, thereby ensuring the deployed packages are efficiently managed and retrievable as needed .

The choice of storage layer, whether filesystem or object storage, impacts the underlying design and implementation of the package system's REST API in terms of how the data persistence and retrieval operations are handled. Different storage strategies require specific configuration through a flag in 'application.properties', which can be overridden by environment variables. This flexibility affects scalability, performance, and how data is managed internally, enabling customization to suit various deployment environments .

The deployment REST endpoint is responsible for accepting and handling uploaded files for deployment purposes. It specifically handles two types of files: 'package.rep', which is a binary file under the hood a .zip file containing compiled source code, and 'meta.json', a metafile providing additional package information such as name, version, author, and dependencies .

The 'meta.json' file must include fields such as 'name', 'version', 'author', and 'dependencies'. This information is critical as it provides the necessary metadata to identify the package, ensure version control, credit authorship, and handle dependencies during deployment. This structured data helps maintain package integrity and manage compatibility with other libraries and systems .

Deploying the Spring Boot application to a Docker container ensures consistency across different environments and simplifies deployment processes by packaging the application along with all dependencies. By providing it in a public repository, it ensures accessibility for testing and validation by the reviewing team, facilitating easier verification of the solution's robustness and alignment with the project criteria .

The implementation requires two separate Java libraries to support basic write and read operations for different storage strategies: 'filesystem' and 'object-storage'. These libraries must be deployed to a private maven repository at Repsy. The Spring Boot application uses these libraries, ensuring modular and scalable storage management. Integrating these libraries allows for a flexible and adaptable system architecture where storage strategies can be easily switched as per the deployment needs .

Providing only two REST endpoints simplifies the API design, focusing it specifically on the deployment and download functionalities. This approach reduces potential attack vectors and minimizes complexity, ensuring a clearer, more maintainable system. Designing them requires careful consideration of input validation, error handling, response times, and alignment with API guidelines to create a robust and efficient communication interface .

You might also like