You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Back End Test Project <imgsrc="https://coderockr.com/assets/images/coderockr.svg"align="right"height="50px" />
2
+
2
3
You should see this challenge as an opportunity to create an application following modern development best practices (given the stack of your choice), but also feel free to use your own architecture preferences (coding standards, code organization, third-party libraries, etc). It’s perfectly fine to use vanilla code or any framework or libraries.
3
4
4
5
## Scope
5
-
In this challenge you should build an API for an application such as a social event network that implements the following features:
6
+
7
+
In this challenge you should build an API for an application that stores and manages investments, it should have the following features:
8
+
9
+
1.__Creation__ of an investment with an owner, a creation date and an amount.
10
+
1. The creation date of an investment can be today or a date in the past.
11
+
2. An investment should not be or become negative.
12
+
2.__View__ of an investment with its withdrawals and current balance.
13
+
1. Current balance should be the sum of the invested amount, the [gains] and withdrawals.
14
+
3. Partial or total __withdrawal__ of the investment amount.
15
+
1. Should not be able to withdraw more than the available balance.
16
+
2. Withdrawals in the past can be created, but can't happen before the investment creation or previously created withdrawals.
17
+
3. Should show the amount paid on [taxes].
18
+
4.__List__ of a person's investments
19
+
1. This list should have pagination.
6
20
7
21
__NOTE:__ the implementation of an interface will not be evaluated.
8
22
9
-
### Public Area
10
-
1.__A public event list:__ When accessing the main route, the application should show a list of all the events registered, paging them every 10 events;
11
-
- 1.1 The user should be able to filter the list of events by dates, or regions;
12
-
2.__Event details:__ the application must allow the user to see the details of the event, by clicking on the event listing, or accessing the event link;
13
-
3.__User signup:__ the application should allow the user to register by informing: Name, Email, Password, Bio, Profile Picture, City, and State;
14
-
4.__User login:__ The application should allow the user to login using their credentials;
15
-
- 4.1 The login should persist when the application is closed, or reloaded;
16
-
17
-
### Logged Area
18
-
5.__Friend invitation:__ the application will allow the user to enter an email to add as a friend;
19
-
6.__Add as friend:__ The informed user should receive a friend request, or an invitation to register, if they are not already a user;
20
-
7.__Friendship management:__ the user will be able to see your new friend requests, list your friends, and undo friendships;
21
-
8.__Event registration:__ the application should allow the user to register an event by informing: Name, Description, Date, Time, and Place;
22
-
- 8.1 The user should be able to edit and cancel events their events;
23
-
9.__Invite friends to event:__ the user can invite their friends to events, being able to invite all friends, or only the selected ones;
24
-
- 9.1 If the user has already been invited to the event, regardless of their status (confirmed, rejected, awaiting confirmation), the invited user should not be notified of the invitation again;
25
-
10.__My event list:__ the user should be able to see their events, being able to filter them by those who will participate, and the ones that he created;
26
-
11.__Manage event invitations:__ The user can accept, or reject, attend events.
27
-
12.__Events management:__ The user can view their rejected events and undo rejections, deciding to participate, if the event has not yet occurred;
23
+
### Gain Calculation
24
+
25
+
The investment will pay 0.52% every month in the same day of the investment creation, if a withdrawal is made then in that month nothing will be paid.
26
+
27
+
Given that the gain is paid every month, it should be treated as as [compound gain], which means that gain that is not withdrawn will become part of the investment balance for the next payment.
28
+
29
+
### Taxation
30
+
31
+
When money is withdrawn, tax is triggered. Taxes apply only to the profit/gain portion of the money withdrawn. For example, if the initial investment was 1000.00, the current balance is 1200.00, and you withdraw 150.00, then the taxes will be applied to 16.67% = (200/1200) of the amount withdrawn. Meaning that you should apply tax on 25.00 (150 x 16,67%).
32
+
33
+
The tax percentage changes according to the age of the investment:
34
+
* If it is less than one year old, the percentage will be 22.5%
35
+
* If it is between one and two years old, the percentage will be 18.5%.
36
+
* If older than two years, the percentage will be 15%.
28
37
29
38
## Requirements
30
39
1. Create project using any technology of your preference. It’s perfectly OK to use vanilla code or any framework or libraries;
31
40
2. Although you can use as many dependencies as you want, you should manage them wisely;
32
-
3. The API should be covered by unit tests;
33
-
4. It is not necessary to send the notification emails, however, the code required for that would be welcome;
34
-
5. The API must be documented in some way.
41
+
3. It is not necessary to send the notification emails, however, the code required for that would be welcome;
42
+
4. The API must be documented in some way.
35
43
36
44
## Deliverables
37
45
The project source code and dependencies should be made available in GitHub. Here are the steps you should follow:
38
46
1. Fork this repository to your GitHub account (create an account if you don't have one, you will need it working with us).
39
-
2. Create a "development" branch and commit the code to it. Do not push the code to the master branch.
47
+
2. Create a "development" branch and commit the code to it. Do not push the code to the main branch.
40
48
3. Include a README file that describes:
41
-
- Special build instructions, if any
42
-
- List of third-party libraries used and short description of why/how they were used
49
+
- Special build instructions, if any
50
+
- List of third-party libraries used and short description of why/how they were used
51
+
- A link to the API documentation.
43
52
4. Once the work is complete, create a pull request from "development" into "master" and send us the link.
44
53
5. Avoid using huge commits hiding your progress. Feel free to work on a branch and use rebase to adjust your commits before submitting the final version.
45
54
@@ -57,6 +66,7 @@ Use the following checklist to ensure high quality of the project.
57
66
- Are all requirements set above met?
58
67
- Is coding style consistent?
59
68
- The API is well documented?
69
+
- The API has unit tests?
60
70
61
71
## Submission
62
72
1. A link to the Github repository.
@@ -65,3 +75,11 @@ Use the following checklist to ensure high quality of the project.
65
75
## Have Fun Coding 🤘
66
76
- This challenge description is intentionally vague in some aspects, but if you need assistance feel free to ask for help.
67
77
- If any of the seens out of your current level, you may skip it, but remember to tell us about it in the pull request.
78
+
79
+
## Credits
80
+
81
+
This coding challenge was inspired on [kinvoapp/kinvo-back-end-test](https://github.com/kinvoapp/kinvo-back-end-test/blob/2f17d713de739e309d17a1a74a82c3fd0e66d128/README.md)
0 commit comments