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 4ad45b4
Show file tree
Hide file tree
Showing 9 changed files with 8,498 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}}
65 changes: 37 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,40 +1,49 @@
# 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.
## Introduction 🌟

```
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.

## Available Scripts
## Live Preview 🖥️

In the project directory, you can run:
Experience the Policy Builder firsthand: [Policy Builder Preview](#)

### `npm start`
## Key Features 📚

Runs the app in the development mode.\
Open [http://localhost:3000](http://localhost:3000) to view it in your browser.
- **Rule Data Source**: Leverages EC Policies Data for a comprehensive rule set.
- **Modern Framework**: Built with a popular JavaScript framework.

The page will reload when you make changes.\
You may also see any lint errors in the console.
## How to Use 🛠️

### `npm test`
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.

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.
## Tools and Libraries 🧰

### `npm run build`
This project was brought to life using the following 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.
- **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 4ad45b4

Please sign in to comment.