-
Notifications
You must be signed in to change notification settings - Fork 51
Cynthesize Codebase
Cynthesize uses latest Angular 7 in the frontend and Hasura's GraphQL Engine in the backend. We don't want a hassle of a backend framework (to deal with a database) to create stuff that actually matters.
For developers to start right away with cloning and running the application, we've deployed an instance of GraphQL engine on Heroku. Here's the detailed information about the app:
Let's get started with the easy part first!
The directory structure for the Angular application is quite simple and in a modular fashion. We are following the "feature-by-folder" pattern. Each folder is built with an attempt to keep saperate the features and the components such that they are resuable throughout the codebase.
As in a typical Angular application, the base module that initiates all the components and dependent modules is App Component
. The folder /src/app
contains all the modules and components that are rendered on the main index.html file.
The Shared directory contains all the components and directives that are reusable and required by other components. The Shared Module declares all the components and exports them to be used by other components. To use a shared component, just import SharedModule
in your (let's say FeatureModule) FeatureModule
and you may use respective selectors.
The Core directory has all the services declared in the respective folders. The services are injectibles that are available in the RootModule and availabl throughout the project.
Hasura provides ready to use GraphQL Engine right out of the box! You may access the deployed instance here. Use pass code top_secret_code
to enter the backend.
To avail the facilities and features provided by Hasura, Angular uses Apollo Client to create queries, mutations and subscriptions. To bridge the frontend and backend the settings for interacting with the deployed instance are given here.