Skip to content

Commit

Permalink
Adding a demo webpage
Browse files Browse the repository at this point in the history
  • Loading branch information
seanconroy2021 committed Nov 8, 2023
1 parent 62e6a2b commit 47d8662
Show file tree
Hide file tree
Showing 10 changed files with 8,521 additions and 14,739 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Build and Deploy
# Build and deploy React app to GitHub Pages on push to main branch (this is for demo purposes only)
# TODO// make the deploy like this https://github.com/enterprise-contract/review-rot/blob/main/.github/workflows/publish.yaml
on:
push:
branches:
- main

jobs:
build-and-deploy:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '21'

- name: Install dependencies
run: npm install

- name: Build React app
run: npm run build

- name: Deploy to GitHub Pages
uses: JamesIves/[email protected]
with:
branch: demoWebsite
folder: build
token: ${{ secrets.GHTOKEN}}
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2023 Tharindu N. Madhusanka

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
67 changes: 39 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,40 +1,51 @@
# Getting Started with Policy Builder POC App
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
# Policy Builder for EC 🛠️

```
policy-builder/
src/
components/ # UI components like buttons, inputs, etc.
data/ # Static data, such as the JSON file with rules.
hooks/ # Custom React hooks for state management, data fetching, etc.
utils/ # Utility functions for tasks like YAML parsing.
views/ # Components that represent full pages or major parts of a page.
App.js # The main application component.
index.js # The entry point for the React application.
⚠️ **Note**: The Policy Builder is currently a POC and is not fully operational. Your constructive feedback and suggestions are highly encouraged to help evolve this project.

```
## Introduction 🌟

## Available Scripts
This is my personal project, the Policy Builder for EC, aimed at enhancing the experience of creating `policy.yaml` files for Enterprise Contract (EC). It's designed to be a user-friendly and efficient alternative to manual editing.

In the project directory, you can run:
## Live Preview 🖥️

### `npm start`
Experience the Policy Builder firsthand: [Policy Builder Preview](http://seanconroy.link/policy_builder/)

Runs the app in the development mode.\
Open [http://localhost:3000](http://localhost:3000) to view it in your browser.
## Key Features 📚

The page will reload when you make changes.\
You may also see any lint errors in the console.
- **Rule Data Source**: Leverages EC Policies Data for a comprehensive rule set.
- **Modern Framework**: Built with a popular JavaScript framework.

### `npm test`
## How to Use 🛠️

Launches the test runner in the interactive watch mode.\
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
1. **Find Rules**: Search and navigate through rules with ease.
2. **Craft Your Policy**: Add rules.
3. **Export**: Create your `policy.yaml` file with a single click.
4. **EC Ready**: The exported file is immediately ready for use with EC.

### `npm run build`
## Tools and Libraries 🧰

Builds the app for production to the `build` folder.\
It correctly bundles React in production mode and optimizes the build for the best performance.
This project was brought to life using the following tools and libraries:

- **Node.js**: The runtime environment that executes the JavaScript code server-side.
- **npm**: The package manager for managing JavaScript packages.
- **React**: The JavaScript library used for building the user interface.
- **Create React App**: The starting boilerplate used to set up new React projects.
- **Git**: The version control system for tracking changes and collaborating.


## Join the EC Community 🤝

Get involved with the EC community on Slack: [Join EC Slack](https://join.slack.com/t/enterprisecontract/shared_invite/zt-26l68e6wj-apw7c55CsDtd6Q9TgtiGuw)

## Feedback and Contributions 📢

Your feedback is crucial to the growth of this project. Please share your thoughts and contribute to the development of Policy Builder.

## License 📄

This project is licensed under the MIT License - see the [LICENSE.md](LICENSE) file for details.

---

⚠️ **Note**: The Policy Builder is currently a POC and is not fully operational. Your constructive feedback and suggestions are highly encouraged to help evolve this project.

The build is minified and the filenames include the hashes.\
Your app is ready to be deployed!
Loading

0 comments on commit 47d8662

Please sign in to comment.