.
├── docker-compose/
├── docs/
├── packages/
├── sample/
├── CONTRIBUTING.md
├── LICENSE
├── README.md
├── package-lock.json
├── package.json
└── yarn.lock
packages
directory is where the main code resides, it is where all the custom components published and provided by@samagra-x/stencil
package can be found. All the featuers that you code will be implemented here.sample
directory contains reference applications showcasing individual functionalities and how they can setup or migrated in your nest application via stencil.docker-compose
directory contains the commonly used docker-compose setups which we find handy.docs
this folder contains the documentation for the framework. This is a docusaurus app which can be started for easy reference.
To set up Stencil in your local development environment; follow the steps listed below
- Fork the stencil repo
- Clone your fork into any folder of your choice via
git clone https://github.com/<USERNAME>/stencil.git
- The
packages/common
folder corresponds to the npm package@samagra-x/stencil
- Any features additoins or bug fixes are to be done here
- Corresponding to every functionality in the
common
folder you can find an example application in thesample
folder - Here's where you can realise changes made to the package and test your changes
Once the repository is setup your workflow will look like the following.
- Initially make changes to
packages/common/src
- Once changes have been made to the
src
folder you are supposed to build the package vianpm run build
. This is to be done inside thepackages/common
directory - Once changes are made run
npm link
in thepackages/common
directory (this creates a symlink of your modified package in the node globals and the published package is overriden) - Then navigate to the example app in
sample
which corresponds to the changes you have made runnpm install
to set up the dependencies. After setting up the dependencies runnpm link @samagra-x/stencil
(this lets the project know you want to use the modified package and not the published package) - Once the feature runs as expected continue to writing tests
- To write tests find the
/test
- In the
packages/common
you will find two kinds of tests - One is a
service-spec
test, where the service layer tests are defined - The other is an
app.e2e
test, here the application controllers are tested - To run the
service-spec
tests runnpm run test
and to run theapp.e2e
tests runnpm run test:e2e
- For every new feature or bug fix you are supposed to either write new tests or modify current test suites
Before commiting and submitting pull request follow the given steps
- Lint your code with
prettier
before your commit vianpm run lint
- Make sure all test suites are passing before you make your commit/pull request
- Use
npm run test
andnpm run test:e2e
and make sure all tests are passing before making your commit
-
As a first time contributor, navigating through the project, it can be quite daunting for you. Please make sure to go through the repository structure to understand the project a bit better, if you want to understand the project better.
-
Open a issue ticket for any gap in documentation or bug or feature requests that you have, opening up issue tickets is always a good way to contribute.
-
You can help review open PRs for best backend and devops realted code practices and help the contributors out.
-
Lastly and the most obvious one feel free to pick up open issue tickets and raise a PR for it resolving the bug, feature or documentation request.
Ideally all the tickets are open for the open source and C4GT Community to contribute to, but the assignment of a issue comes only after the contributor has raised a draft PR implementing the partial functionality required by the issue ticket.
-
Please don't spam the comments on an issue tickets with assignment requests, keep the comment sections clean and only ask questions/clarifications regarding the issue ticket, the assignment policy has been clearly stated in the community-issue-assignment-policy section.
-
Make sure to populate all the relevant and required fields of the PR template while raising the PR.
In case you're unfamiliar with the technology being used for the project and how to understand the project better this section will act as a repository to provide some base material around them to help you get started