Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(backend): Replace testbackend with the new origin-backend #137

Merged
merged 21 commits into from
Oct 25, 2019

Conversation

josipbagaric
Copy link
Contributor

@josipbagaric josipbagaric commented Oct 14, 2019

Replaced utils-testbackend with a new origin-backend.

Features:

  • New ORM structure with the following entities:
    • MarketContractLookup - contains a reference to all the Market contracts deployed
    • AnyEntity - serves as a multi-functional key-value store-it-all entity
  • Use of TypeORM for easier adaptation to different databases
  • Store test databases in SQLite instead of a JSON file
  • Add an API versioning scheme: HOST/api (latest API version) and HOST/api/v1 point to the same API for now, but it's extendable in the future
  • Separate each route to a separate file and use a router to handle routes
  • Better code structure and quality

@kosecki123
Copy link
Contributor

Since we reworking the backend I would like us to create origin-backend-client which consists of the code that will communicate with the API as a service as well as mock object that can be used for testing. This enables us to:

  • get rid of direct calling API
  • remove backend dependencies from the projects in favour of origin-backend-client
  • faster testing

@josipbagaric josipbagaric marked this pull request as ready for review October 24, 2019 09:32
@energywebfoundation energywebfoundation deleted a comment from e00dan Oct 24, 2019

@Entity()
@Unique(['type', 'contractAddress', 'identifier'])
export class AnyEntity extends BaseEntity {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not naming it Entity?

@josipbagaric josipbagaric merged commit c428e7d into master Oct 25, 2019
@josipbagaric josipbagaric deleted the origin-backend branch October 25, 2019 08:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants