DON'T FORGET TO FOLLOW 7 DEADLY CONVENTION, MENTIONED IN THIS REPOSITORIES ON CONVENTION
- NodeJS (Javascript)
- Golang
- Java
One day you are thinking of building a music subscription apps that can do non-cash transactions, as the Minimum Viable Product (MVP)
you want this application to have the following these features:
- A new customer can register to the system
- Customer can do top-up balance
- Customer can buy a subscription
- Customer can renew a subscription
1. Customer
2. Subscription
3. Transaction
GIVEN I am unregistered person
WHEN I register as customer with (name, email, phone)
THEN Customer should be record as new customer and return Customer ID
GIVEN I am Customer
WHEN I top-up some amount balance
THEN Customer balance should be increased
GIVEN I am Customer
WHEN I buy a subscription
THEN Customer balance should be decreased, Transaction recorded as receipt, and return Transaction ID
GIVEN I am Customer
WHEN I need to renew a subscription
THEN Customer balance should be decreased, Transaction recorded as receipt, and return Transaction ID
-
Customer:
- id
- name
- phone
- balance
-
Subscription
- id
- name
- price
- duration
-
Transaction
- id
- customer_id
- subscription_id
- total
-> /customer/register
{
"name": ""
"email": ""
"phone": ""
}
-> /customer/topup
{
"customer_id": ""
"amount": ""
}
-> /transaction/payment
{
"customer_id": ""
"subscription_id": ""
"total": ""
}
- Setup your Environment of this project by your chosen language
- Prepare the actors services (Controller, Model, Route)
- Customer
- Register
- Topup
- Debit
- Subscription
- Create Subscription
- Read Subscription
- Read Subscription By Id
- Transaction
- Create Transaction
- Read Transaction
- Read Transaction By ID
- Customer
- Do Testing
1. Fork This Repository
2. Follow the project convention
3. Finish all TODO
4. Implement Test Driven Development
1. `Folder structure` can be modified by your own
2. Implement `REST API` will be a score plus
3. ONLY BUSINESS LOGIC (BACKEND)
4. Don't forget to update your .gitignore file
5. Code with your soulmate (Pairing) or do it alone
Please follow the CONTRIBUTING