Skip to content

Commit

Permalink
Merge pull request #45 from softrams/develop
Browse files Browse the repository at this point in the history
Release 1.0.0
  • Loading branch information
Whamo12 committed May 15, 2020
2 parents 2fe0281 + 0910ebe commit 09ccb6b
Show file tree
Hide file tree
Showing 25 changed files with 2,049 additions and 248 deletions.
37 changes: 37 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Pull Request

Thank you for your contribution to the Bulwark. Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

Fixes # (issue)

## Type of change

- [ ] A new feature
- [ ] A bug fix
- [ ] Documentation only changes
- [ ] Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
- [ ] A code change that neither fixes a bug nor adds a feature
- [ ] A code change that improves performance
- [ ] Adding missing tests or correcting existing tests
- [ ] Changes that affect the build system or external dependencies
- [ ] Changes to our CI configuration files and scripts
- [ ] Other changes that don't modify src or test files

Add description here

```release-note
```

---

## Checklist

- [ ] My code follows the [contributing](../CONTRIBUTING.md) guidelines of this project
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] Any dependent changes have been merged and published in downstream modules
1 change: 1 addition & 0 deletions CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @softrams/bulwark-core-team
76 changes: 76 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at opensource@softrams.com. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq
75 changes: 1 addition & 74 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,77 +44,4 @@ Any release from master will have a unique version

```
npm run lint
```

### Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, gender identity and expression, level of experience,
nationality, personal appearance, race, religion, or sexual identity and
orientation.

### Our Standards

Examples of behavior that contributes to creating a positive environment
include:

- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

- The use of sexualized language or imagery and unwelcome sexual attention or
advances
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or electronic
address, without explicit permission
- Other conduct which could reasonably be considered inappropriate in a
professional setting

### Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

### Scope

This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.

### Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at [INSERT EMAIL ADDRESS]. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

### Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at [http://contributor-covenant.org/version/1/4][version]

[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/
```
23 changes: 13 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ $ npm i
Run in development mode:

```
npm run start:dev
$ npm run start:dev
```

Run in production mode:

```
npm start
$ npm start
```

### Environment variables
Expand Down Expand Up @@ -126,15 +126,18 @@ FROM_EMAIL_PASSWORD=""
COMPANY_NAME=""
```

## Authentication/Authorization
## Seed Initial User

Most of the application routes are protected by middleware that validates JWT token with each request. Included in these routes is the `/api/user/create` route which creates users. Therefore, to create the initial user there are two options:
On initial startup, Bulwark will not have any users. Therefore, it is necessary to seed the **first** user.

1. temporarily remove the `jwtMiddleware.checkToken` middleware on the `/api/user/create` route
2. Manually insert a user into the database
1. Use the Bcrypt library to generate a hash. Here's a [Gist](https://gist.github.com/Whamo12/e16fe650af4a04044768d216f39f0492) that will return a hash.
2. Using the hash, manually insert the initial user into the database
1. `` INSERT INTO `foobar`.`user` (`email`, `password`, `active`, `uuid`) VALUES ('foo@bar.com', 'changeMeHash', '1', ''); ``
<!-- Afterwords, subsequent users should be invited. -->

1. `$ npm install`
2. `$ npm run start:dev`
3. Navigate to [seed-user.ts](https://github.com/softrams/bulwark/blob/develop/src/temp/seed-user.ts)
4. Update the `userConfig` objecy with user credentials, save, and wait for the JS to compile
5. `$ node ./dist/temp/seed-user.js`
6. Log into Bulwark with credentials used in step 4

## Built With

Expand All @@ -151,7 +154,7 @@ The Softrams Bulwark core development team are:

## Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. Read the [contribution guidelines](CONTRIBUTING.md) first.
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. Read the [contribution guidelines](CONTRIBUTING.md) first.

## License

Expand Down
3 changes: 3 additions & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
extends: ['@commitlint/config-conventional']
};
2 changes: 1 addition & 1 deletion frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "frontend",
"version": "0.0.0",
"version": "1.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve",
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/app/alert/alert.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ describe('AlertService', () => {
beforeEach(() => TestBed.configureTestingModule({}));

it('should be created', () => {
const service: AlertService = TestBed.get(AlertService);
const service: AlertService = TestBed.inject(AlertService);
expect(service).toBeTruthy();
});
});
2 changes: 1 addition & 1 deletion frontend/src/app/app.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ describe('AppService', () => {
beforeEach(() => TestBed.configureTestingModule({}));

it('should be created', () => {
const service: AppService = TestBed.get(AppService);
const service: AppService = TestBed.inject(AppService);
expect(service).toBeTruthy();
});
});
Loading

0 comments on commit 09ccb6b

Please sign in to comment.