Skip to content

Commit

Permalink
Merge pull request #3 from skarelin/profile-picture-integration
Browse files Browse the repository at this point in the history
First part of profile-picture implementation.
  • Loading branch information
skarelin authored Jan 5, 2022
2 parents 2e88553 + 7bf1d24 commit 531d805
Show file tree
Hide file tree
Showing 38 changed files with 822 additions and 320 deletions.
71 changes: 43 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,39 +1,54 @@
20.12.1996 - project started.

Tech specification:
1. Prefix for every table in database: BF_ (business-finder)
2. At this moment in APIs we have two types errors: business (success + errors), request (timestamp + status + errors);
Later probably we will use only one structure.
- JSON structure for business error:
{
success: true/false,
errors: [...]
}
3. Email is the unique username for every user in application.
4. Spring Security: we are not using @PreAuthorize. Only @Secured is allowed.
5. We have system user in application. See `BfSecurityConfiguration.systemUser()`; Use `private final User systemUser;` to inject it.
6. Every API should be documented. Later it's more readable in Swagger.
7. (if mobile application should be updated) Change `bf.application.version` in properties for every deploy to PROD environment. (should be CI/CD in future)
8. (not now, after logging implementation) We are using LogBack. We should log every business action.
9. If you want to add the custom business exception, please remember to update `CustomGlobalExceptionHandler`
10. Entity as a response should be mapped to DTO.
11. Command should be one-directional.

TODO:

1. Add flyway;
2. Correct configuration for database;
3. build.gradle - version should be declared as variables;
4. @DeleteMapping for user - requirement for iPhone users.
5. Pay attention to @Transactional annotation.
6. Expiring user. If subscription is cancelled. Job which making the user expired and unactivated.
7. Countries and cities (probably it will be stored in database)
8. Admin panel. PartnershipProposal entity - add there field about verified.
9. Add swagger.
10. Make sure that every business action has been logged.
11. User is removed. Implement scheduler for removing archive partnership-proposals.
12. One user can add only one proposal.
4. Pay attention to @Transactional annotation.
5. Expiring user. If subscription is cancelled. Job which making the user expired and unactivated.
6. Countries and cities (probably it will be stored in database)
7. Admin panel. PartnershipProposal entity - add there field about verified.
8. Add swagger.
9. Make sure that every business action has been logged.
10. User is removed. Implement scheduler for removing archive partnership-proposals.
11. Announcements to users.
12. Change Error enum to ErrorCode. It's more readable.
13. Compare Partnership and Investment entities. For example Language enum should be already added!
14. Limit for proposals: 50. Smart value should be included I think.
15. After updating proposals we also need to approve it in Admin panel. Let's just set "NEW" or "UPDATED" status in entities.
16. Create BfUserDetails entity.

Mobile app:

1. Announcement
2. Announcement -> update.
3. "Remove user" button should be implemented in application for sure.

Questions:

Form Partnership Proposal:

1. Subject
2. Industry
3. Country
4. City
5. KnowledgeOfProposalCreator
6. Team Available
7. Team Description
8. Additional Description
9. Team language
10. Attachment? (business plan)

Form Investment Proposal:

1. Subject
2. Project Description
3. Country
4. City
5. Team language (optional)
6. Min investment (optional)
7. Project Budget (optional)
8. Payback period (optional)
9. History of company (optional)
10. Attachment? (business plan)
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ dependencies {
implementation 'org.hibernate:hibernate-validator:7.0.2.Final'
implementation 'org.apache.commons:commons-lang3:3.0'
implementation 'org.springframework.boot:spring-boot-starter-security:2.6.1'
implementation 'org.springframework:spring-web:5.3.14'
// implementation('io.springfox:springfox-swagger2:3.0.0')
// implementation('io.springfox:springfox-swagger-ui:2.8.0')
}
Expand Down
5 changes: 5 additions & 0 deletions API-SPECIFICATION.md → docs/API-SPECIFICATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ PUT: /investment-proposal/{investment-proposal-uuid} -> update given investment-

DELETE: /investment-proposal/{investment-proposal-uuid} -> delete investment by UUID;

==============================[User-Profile-Picture-Controller]
PUT: /user/profile-picture/ -> update user profile picture. (contains also add operation);

DELETE: /user/profile-picture/ -> remove user profile picture.

InvestmentProposalEntity(WIP):
- subject(must have);
- description(optional);
Expand Down
21 changes: 21 additions & 0 deletions docs/TECH-SPECIFICATION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
Tech specification:

1. Prefix for every table in database: BF_ (business-finder)
2. At this moment in APIs we have two types errors: business (success + errors), request (timestamp + status + errors);
Later probably we will use only one structure.

- JSON structure for business error:
{ success: true/false, errors: [...]
}

3. Email is the unique username for every user in application.
4. Spring Security: we are not using @PreAuthorize. Only @Secured is allowed.
5. We have system user in application. See `BfSecurityConfiguration.systemUser()`; Use `private final User systemUser;`
to inject it.
6. Every API should be documented. Later it's more readable in Swagger.
7. (if mobile application should be updated) Change `bf.application.version` in properties for every deploy to PROD
environment. (should be CI/CD in future)
8. (not now, after logging implementation) We are using LogBack. We should log every business action.
9. If you want to add the custom business exception, please remember to update `CustomGlobalExceptionHandler`
10. Entity as a response should be mapped to DTO.
11. Command should be one-directional.
217 changes: 0 additions & 217 deletions postman/Business Finder-2021-12-28.postman_collection.json

This file was deleted.

Loading

0 comments on commit 531d805

Please sign in to comment.