Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create website for testing Token generation #16 #17

Merged
merged 31 commits into from
Oct 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
4f22b51
website for testing token generation
munyanezaarmel Oct 3, 2024
061ee53
feat(website for token generator):add website for opengotoken generator
munyanezaarmel Oct 8, 2024
0596087
fix(website):rename website and add readme
munyanezaarmel Oct 17, 2024
b1a7daa
updated readme
munyanezaarmel Oct 17, 2024
26d47d0
deleted
munyanezaarmel Oct 17, 2024
52dd43d
fix the duplicates
munyanezaarmel Oct 17, 2024
d679743
update package
munyanezaarmel Oct 22, 2024
9ae86e2
updated optiion value
munyanezaarmel Oct 22, 2024
04e3c77
Merge branch 'main' into main
munyanezaarmel Oct 22, 2024
20c3427
fix lint
munyanezaarmel Oct 23, 2024
3a3585c
fix markdown errors
munyanezaarmel Oct 23, 2024
b3f2f43
Deleted the file and updated README
munyanezaarmel Oct 23, 2024
f9d3605
deploy to github pages
munyanezaarmel Oct 23, 2024
24c4338
fix lint
munyanezaarmel Oct 23, 2024
cca53d9
workflow file
munyanezaarmel Oct 23, 2024
4810599
fix workfile
munyanezaarmel Oct 23, 2024
2cb9abd
workfile
munyanezaarmel Oct 24, 2024
a5549e4
fix linting
munyanezaarmel Oct 24, 2024
ce9a68e
fix build script
munyanezaarmel Oct 24, 2024
bbc97ae
fix build errors
munyanezaarmel Oct 24, 2024
8256d72
fix deploy job
munyanezaarmel Oct 24, 2024
da7d049
fix deploy script
munyanezaarmel Oct 24, 2024
9076e5e
fix deploy
munyanezaarmel Oct 24, 2024
477585f
fix deploy
munyanezaarmel Oct 24, 2024
20eadca
fix deploy
munyanezaarmel Oct 24, 2024
e2b3e22
fix deploy
munyanezaarmel Oct 24, 2024
6d546a0
fix deploy
munyanezaarmel Oct 24, 2024
14cde89
fix lint
munyanezaarmel Oct 24, 2024
08d60eb
fix deploy
munyanezaarmel Oct 24, 2024
a2a9532
fix deploy
munyanezaarmel Oct 24, 2024
9a0c5f1
Update .github/workflows/deploy.yml
dmohns Oct 24, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 66 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# Sample workflow for building and deploying a Next.js site to GitHub Pages
name: Deploy GitHub Pages

on:
# Runs on pushes targeting the default branch
push:
branches: [main]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow one concurrent deployment
concurrency:
group: pages
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: website
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup Pages
uses: actions/configure-pages@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "18"
cache: npm
cache-dependency-path: website/package-lock.json

- name: Install Dependencies
run: npm ci

- name: Build Next.js Project
run: npm run build

- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: website/out

# Deployment job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
3 changes: 3 additions & 0 deletions website/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": ["next/core-web-vitals", "next/typescript"]
}
36 changes: 36 additions & 0 deletions website/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js
.yarn/install-state.gz

# testing
/coverage

# next.js
/.next/
/out/

# production
/build

# misc
.DS_Store
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# local env files
.env*.local

# vercel
.vercel

# typescript
*.tsbuildinfo
next-env.d.ts
40 changes: 40 additions & 0 deletions website/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# PAYGO Token Generator

This project is a **OpenPAYGO Token Generator** built with **Next.js**. It allows users to generate tokens for OpenPAYGO using specific parameters such as serial number, counter, starting code and private key. The application provides a user-friendly interface to input these parameters and generates a token based on the provided data.

## Getting Started

To run the development server, follow these steps:

1. Clone the repository:

```bash
git clone https://github.com/EnAccess/OpenPAYGO-js
cd website

```

2. Install the dependencies:

```bash
npm install
```

3. Run the development server:

```bash
npm run dev
# or
yarn dev
# or
pnpm dev
```

4. Open [http://localhost:3000](http://localhost:3000) in your browser to see the application in action.

## Features

- Input fields for serial number, counter, starting code, private key, command, and command argument.
- Validation for input fields to ensure correct data is provided.
- Displays the generated token and the next token count after submission.
- Error handling for invalid inputs and generation failures.
12 changes: 12 additions & 0 deletions website/next.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
assetPrefix: process.env.NODE_ENV === "production" ? "/OpenPAYGO-js" : "",
basePath: process.env.NODE_ENV === "production" ? "/OpenPAYGO-js" : "",
output: "export",
trailingSlash: true,
images: {
unoptimized: true,
},
}

export default nextConfig
Loading
Loading