Skip to content

Commit c4778a2

Browse files
committed
docs: let's welcome contributors 🌟!
1 parent acae8c5 commit c4778a2

File tree

1 file changed

+127
-62
lines changed

1 file changed

+127
-62
lines changed

‎README.md

+127-62
Original file line numberDiff line numberDiff line change
@@ -1,167 +1,232 @@
11
# Secure Dashboard for the OpenJS Foundation
22

3-
This is an evolution of [this proof of concept (POC)](https://github.com/UlisesGascon/poc-openjs-security-program-standards-dashboard).
3+
This project aims to provide a secure and user-friendly dashboard for managing and monitoring projects under the OpenJS Foundation. It evolves from [this proof of concept (POC)](https://github.com/UlisesGascon/poc-openjs-security-program-standards-dashboard) and currently we are developing an MVP version ([milestone roadmap](https://github.com/secure-dashboards/openjs-foundation-dashboard/issues/30)).
44

5-
## Prerequisites
5+
## Table of Contents
66

7-
- Node.js 22 and npm
8-
- Docker and Docker Compose
9-
- Github token with repo:read level access.
7+
1. [Motivation](#motivation)
8+
- [More context](#more-context)
9+
- [Engage now](#engage-now)
10+
2. [Getting Started](#getting-started)
11+
- [Prerequisites](#prerequisites)
12+
- [Infrastructure Setup](#infrastructure-setup)
13+
- [Configuration](#configuration)
14+
3. [Usage](#usage)
15+
- [Projects](#projects)
16+
- [Workflows](#workflows)
17+
- [Checks](#checks)
18+
4. [Database Management](#database-management)
19+
- [Migrations](#migrations)
20+
- [Seeding](#seeding)
21+
- [Schema Management](#schema-management)
22+
5. [Development](#development)
23+
- [Debugging](#debugging)
24+
- [Linting](#linting)
25+
- [Testing](#testing)
26+
6. [Community Guidelines](#community-guidelines)
27+
7. [License](#license)
1028

11-
## Infrastructure
29+
---
1230

13-
This project requires a PostgreSQL database. You can run this project using a local database with Docker. Additionally, this project provides an instance of [Adminer](https://www.adminer.org/) accessible at `http://localhost:8080`.
31+
## Motivation
1432

33+
The goal of this project is to streamline the secure management of OpenJS Foundation projects by providing an intuitive dashboard with robust infrastructure support. It emphasizes security, simplicity, and extensibility ✨
1534

16-
### Starting the Infrastructure
35+
### More Context
1736

18-
To start the infrastructure, run the following command:
37+
A few months ago, we started a discussion about [the OpenJS Security Collab space initiative](https://github.com/openjs-foundation/security-collab-space) ("[Security Program Standards](https://github.com/openjs-foundation/security-collab-space/issues/211)") to build a dashboard for monitoring security parameters in our projects (Node.js, Electron, jQuery, Express, etc.). After carefully planning and securing resources, we are now at an exciting point as we’ve recently launched a pilot program with some projects. 🚀
1938

20-
```bash
21-
npm run infra:start
22-
```
39+
So far, we’ve developed this website: [https://openjs-security-program-standards.netlify.app/](https://openjs-security-program-standards.netlify.app/), which is based on the checklist ([Google Sheet](https://docs.google.com/spreadsheets/d/1GwIsAudAn89xv9DAbr1HUaY4KEVBsYfg--_1cW0uIB0/edit#gid=0)) and the introductory document ([Google Doc](https://docs.google.com/document/d/1bWk3U5XpsKswqlPbZZHGxy3xRPuUx_gVzWa03OiMyQs/edit)) that we compiled during our original research. 😄
2340

24-
### Stopping the Infrastructure
41+
You can watch this [YouTube video](https://www.youtube.com/watch?v=B1kd8k5SvBI) for a proper introduction to the Dashboard and website (both Proof of Concept versions) built based on feedback from [the Express Security WG](https://github.com/expressjs/security-wg) and others.
2542

26-
To stop the infrastructure, run the following command:
43+
In essence, this tool collects information from multiple sources, evaluates it, transforms it into actionable insights, and uses it to build dashboards, tasks, and alerts at both the foundation and project levels. If you prefer a non-video format, here are [the slides](https://slides.ulisesgascon.com/openjs-security-program-standards/) and [the code repository](https://github.com/UlisesGascon/poc-openjs-security-program-standards-dashboard/blob/main/README.md).
2744

28-
```bash
29-
npm run infra:stop
30-
```
45+
Currently, we are focused on building a solid MVP and onboarding new contributors, aiming to create a great product by the end of this process. 😎
3146

32-
## Configuration
47+
### Engage Now
3348

34-
### Environment Variables
49+
Yes, we are looking for HELP in many ways! 😇 Let’s collaborate and have fun together. You can find more information in [the contributing guide](CONTRIBUTING.md). 🌟
3550

36-
This project requires a GitHub token to access the GitHub API. You need to set the `GITHUB_TOKEN` environment variable.
51+
Another great way to get involved is by participating in [the OpenJS Security Collab Space](https://github.com/openjs-foundation/security-collab-space). We hold regular meetings to discuss this initiative and many other exciting topics.
3752

38-
#### Optional: use .env file
53+
---
3954

40-
Create a `.env` file and add your GitHub token:
55+
## Getting Started
4156

42-
```sh
43-
GITHUB_TOKEN=your_github_token_here
44-
```
45-
46-
then use `--env-file` flag to load it, like `node --env-file=.env index.js workflow run --name populate-repos-list`
57+
### Prerequisites
4758

59+
- Node.js 22 and npm
60+
- Docker and Docker Compose
61+
- GitHub token with `repo:read` access level (not needed for development)
4862

49-
## Database Management
63+
### Infrastructure Setup
5064

51-
### Running Migrations
65+
This project requires a PostgreSQL database and includes an instance of [Adminer](https://www.adminer.org/) accessible at `http://localhost:8080`.
5266

53-
To run the latest database migrations, use the following command:
67+
#### Start Infrastructure
5468

5569
```bash
56-
npm run db:migrate
70+
npm run infra:start
5771
```
5872

59-
### Rolling Back Migrations
60-
61-
To rollback the last batch of migrations, use the following command:
73+
#### Stop Infrastructure
6274

6375
```bash
64-
npm run db:rollback
76+
npm run infra:stop
6577
```
6678

67-
### Seeding the Database
79+
### Configuration
6880

69-
To seed the database with initial data, use the following command:
7081

71-
```bash
72-
npm run db:seed
73-
```
82+
#### Environment Variables
7483

75-
### Examine the database schema
84+
Set the `GITHUB_TOKEN` environment variable to authenticate with the GitHub API.
7685

77-
You can find an updated version of the schemas in [/src/database/schema/schema.sql](src/database/schema/schema.sql) so you don't have to start the infra and run the migrations if you just want to know about the database structure.
78-
79-
### Update the database schema
86+
Optionally, use a `.env` file:
87+
```
88+
GITHUB_TOKEN=your_github_token_here
89+
```
8090

81-
To update the schema, use the following command:
91+
Then load it using:
8292

8393
```bash
84-
npm run db:generate-schema
94+
node --env-file=.env index.js workflow run --name populate-repos-list
8595
```
8696

8797
## Usage
8898

8999
### Projects
90100

91-
To add a new project, use the following command:
101+
Add a new project:
92102

93103
```bash
94104
node index.js project add [--name <name>] [--github-urls <urls...>] [--category <category>]
95105
```
96106

97-
For example, to add a project named "express" with GitHub URLs:
107+
Example:
98108

99109
```bash
100110
node index.js project add --name express --github-urls https://github.com/expressjs https://github.com/pillarjs https://github.com/jshttp --category impact
101111
```
102112

103113
### Workflows
104114

105-
To run a workflow, use the following command:
115+
Run a workflow:
106116

107117
```bash
108118
node index.js workflow run [--name <name>]
109119
```
110120

111-
To list all available workflows, use the following command:
121+
List workflows:
112122

113123
```bash
114124
node index.js workflow list
115125
```
116126

117127
### Checks
118128

119-
You can list all the implemented checks, use the following command:
129+
List all checks:
120130

121131
```bash
122132
node index.js check list
123133
```
124-
125-
You can any implemented check at any time by running the following command:
134+
Run a specific check:
126135

127136
```bash
128137
node index.js check run [--name <name>]
129138
```
130139

140+
There is an specific workflow that runs all the checks sequentially:
131141

132-
## Debug mode
142+
```bash
143+
node index.js workflow run run-all-checks
144+
```
133145

134-
This project uses the [debug library](https://www.npmjs.com/package/debug), so you can always use the environmental variable `DEBUG=*` to print more detailed information of the execution.
146+
## Database Management
135147

148+
### Migrations
136149

137-
## Linting
150+
Run latest migrations:
138151

139-
To lint the files, use the following command:
152+
```bash
153+
npm run db:migrate
154+
```
155+
156+
Rollback migrations:
157+
158+
```bash
159+
npm run db:rollback
160+
```
161+
162+
### Seeding
163+
164+
Seed the database:
165+
166+
```bash
167+
npm run db:seed
168+
```
169+
170+
### Schema Management
171+
172+
Check the schema:
173+
174+
Refer to the latest schema file at [/src/database/schema/schema.sql](src/database/schema/schema.sql).
175+
176+
Update the schema:
177+
178+
```bash
179+
npm run db:generate-schema
180+
```
181+
182+
## Development
183+
184+
### Debugging
185+
186+
Enable debug logs using the `DEBUG` environment variable:
187+
188+
```bash
189+
DEBUG=* node index.js
190+
```
191+
192+
### Linting
193+
194+
Run lint checks:
140195

141196
```bash
142197
npm run lint
143198
```
144199

145-
To automatically fix linting issues, use the following command:
200+
Fix lint issues:
146201

147202
```bash
148203
npm run lint:fix
149204
```
150205

151-
## Running Tests
206+
### Testing
152207

153-
To run the tests, use the following command:
208+
Run tests:
154209

155210
```bash
156211
npm test
157212
```
158213

159-
To run the tests with coverage, use the following command:
214+
Run tests with coverage:
160215

161216
```bash
162217
npm run test:coverage
163218
```
164219

220+
Update the snapshots when needed:
221+
```bash
222+
npm run test -- -u
223+
```
224+
225+
## Community Guidelines
226+
227+
We encourage contributors to adhere to our [Code of Conduct](CODE_OF_CONDUCT.md) and [Contributing Guidelines](CONTRIBUTING.md). Security-related concerns should follow our [Security Policy](SECURITY.md).
228+
229+
165230
## License
166231

167-
This project is licensed under the MIT License. See the [LICENSE](/LICENSE) file for details.
232+
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.

0 commit comments

Comments
 (0)