Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
25 changes: 25 additions & 0 deletions .github/workflows/v0-behavior.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: V0 behavior checks
on:
pull_request:
workflow_dispatch:
permissions:
contents: read
jobs:
behavior:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '22'
cache: npm
- name: Install locked dependencies without lifecycle hooks
run: npm ci --ignore-scripts --legacy-peer-deps --no-audit --no-fund
- name: Run focused behavior and HTTP routing tests
run: npm run test:v0
- name: Generate local environment modules without credentials
env:
CI: 'false'
run: node tools/set-env
- name: Check application types and templates
run: node_modules/.bin/ngc --noEmit -p apps/36-blocks/tsconfig.app.json
11 changes: 11 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Working on proxy-ui

Owns the Angular public website, operator dashboard and embeddable authentication widget. Backend APIs, persistence and session policy belong to sibling `user-proxy`; connected applications own business authorization.

Start with the canonical [work state](../user-proxy/docs/WORK-STATE.md), [architecture](../user-proxy/docs/ARCHITECTURE.md), [capabilities](../user-proxy/docs/CAPABILITIES.md), [development](../user-proxy/docs/DEVELOPMENT.md), [security](../user-proxy/docs/SECURITY-OPERATIONS.md) and [design](../user-proxy/docs/DESIGN.md). Preserve existing README contribution rules and DESIGNGUIDE.md. Read widget integration/event guides before changing the custom element contract.

- Inspect status/diff; preserve unrelated changes. New application code uses TypeScript and existing standalone Angular patterns. Use Angular CLI scaffolding when practical; never change architecture solely to satisfy scaffolding.
- Install from lock using `npm ci --ignore-scripts --legacy-peer-deps`; generate ignored env modules with `node tools/set-env`. Review environment base URLs before starting: local config defaults to a remote test API.
- Run `node --test tools/tests/*.test.cjs`, affected builds and `git diff --check`. Existing Nx/Jest targets have known gaps: report exact commands and limitations in canonical work state.
- Keep error, denied, empty and loading states distinct; provide retry. Never render request data as HTML or log/store tokens. Client visibility does not replace server authorization.
- Update the single backend-owned capability matrix and work state alongside changes. Product/architecture guidance is linked, not duplicated here. Public claims require evidence; do not invent SLAs, guarantees or future functional controls.
16 changes: 2 additions & 14 deletions DESIGNGUIDE.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,8 @@
# Proxy UI Design Guide

## Setup Guide
## Setup

1. Clone https://github.com/Walkover-Web-Solution/proxy-UI.git.

2. This project requires Node version 14+, install Node from [here](https://nodejs.org/en/).

3. Go inside the cloned directory `proxy-UI` in any terminal and run these following commands in the terminal to install dependency and start local serve.

4. Run `npm i` for installation of dependencies.

5. Serving the project locally:
* For proxy: Run `npm start` to local serve the project.
* For Admin Panel: Run `npm run start:admin` to local serve the project.
* For chat-widget: Run `npm run start:chat-widget` to local serve the project.
* For otp-provider: Run `npm run start:otp-provider` to local serve the project.
Use the current [README](README.md) and canonical [development guide](../user-proxy/docs/DEVELOPMENT.md) for runtime, install and startup commands. Legacy admin/chat/OTP application commands formerly listed here no longer describe the supplied workspace. The following styling guidance remains reference material; use the canonical [design standards](../user-proxy/docs/DESIGN.md) for product behavior.

## Prerequisites
It is important to have a thorough understanding of **HTML**, **CSS** and its pre-processor **SASS** to contribute to this project. If unaware of any of the above then go through their documention first.
Expand Down
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,17 @@

1. Clone https://github.com/Walkover-Web-Solution/proxy-ui.git.

2. This project requires Node version 14+, install Node from [here](https://nodejs.org/en/).
2. This is Angular 21.2 / Nx 21.6 / TypeScript 5.9. Use a compatible Node runtime; see the [canonical development guide](../user-proxy/docs/DEVELOPMENT.md). Node 14 is unsupported.

3. Go inside the cloned directory `proxy-ui` in any terminal and run these following commands in the terminal to install dependency and start local serve.

4. Run `npm i` for installation of dependencies.
4. Run `npm ci --ignore-scripts --legacy-peer-deps` to install the locked dependencies. Review the development guide before enabling install hooks.

5. Run `npm start` to local serve the project.
5. Configure approved local environment values, run `node tools/set-env`, then `npm start`. The checked-in local API URL points to a remote test service; change it before exercising mutations.

Read [AGENTS.md](AGENTS.md), [current work state](../user-proxy/docs/WORK-STATE.md), [architecture](../user-proxy/docs/ARCHITECTURE.md) and the authoritative [capability matrix](../user-proxy/docs/CAPABILITIES.md). The API is the sibling `user-proxy` repository. `node --test tools/tests/*.test.cjs` runs focused behavior tests; legacy Nx/Jest targets have known gaps recorded in the work state.

The existing contribution and style guidance below remains applicable. Use the canonical development and design guides where obsolete runtime/module instructions conflict with the current standalone Angular architecture.

## Contributing Guide

Expand Down
8 changes: 7 additions & 1 deletion apps/36-blocks/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"index": "apps/36-blocks/src/index.html",
"browser": "apps/36-blocks/src/main.ts",
"server": "apps/36-blocks/src/main.server.ts",
"prerender": true,
"outputMode": "server",
"ssr": {
"entry": "apps/36-blocks/src/server.ts"
},
Expand Down Expand Up @@ -124,11 +124,17 @@
"namedChunks": false
},
"development": {
"security": {
"allowedHosts": ["localhost", "127.0.0.1", "[::1]"]
},
"optimization": false,
"extractLicenses": false,
"sourceMap": true
},
"local": {
"security": {
"allowedHosts": ["localhost", "127.0.0.1", "[::1]"]
},
"optimization": false,
"extractLicenses": false,
"sourceMap": true
Expand Down
7 changes: 7 additions & 0 deletions apps/36-blocks/src/app/app.routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { Route, Router } from '@angular/router';
import { AngularFireAuthGuard, redirectUnauthorizedTo } from '@angular/fire/compat/auth-guard';
import { CookieService } from 'ngx-cookie-service';
import { AuthService } from '@proxy/services/proxy/auth';
import { CanActivateRouteGuard } from './website/home/authguard';

@Component({ template: '', standalone: true })
class NotFoundRedirectComponent {}
Expand All @@ -27,6 +28,12 @@ export const appRoutes: Route[] = [
data: { authGuardPipe: redirectUnauthorizedToLogin },
canActivate: [AngularFireAuthGuard],
},
{
path: 'project-load-error',
loadComponent: () =>
import('./panel/guard/project-load-error.component').then((c) => c.ProjectLoadErrorComponent),
canActivate: [CanActivateRouteGuard],
},
{
path: 'project',
loadComponent: () =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export class RootEffects {
switchMap((req) => {
return this.rootService.getProjects().pipe(
map((res) => {
if (res.hasError) {
if (res.hasError || !Array.isArray(res.data?.data)) {
this.showError(res.errors);
return rootActions.getAllProjectsError();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export interface IRootState {
//All project
allProjects: IPaginatedResponse<IProjects[]>;
projectInProcess: boolean;
projectLoadFailed: boolean;
}

export const initialState: IRootState = {
Expand All @@ -33,6 +34,7 @@ export const initialState: IRootState = {
clientsInProcess: false,
switchClientSuccess: false,
projectInProcess: false,
projectLoadFailed: false,
allProjects: null,
};

Expand Down Expand Up @@ -121,20 +123,23 @@ const _rootReducer = createReducer(
return {
...state,
projectInProcess: true,
projectLoadFailed: false,
};
}),
on(rootActions.getAllProjectSuccess, (state, { response }) => {
return {
...state,
allProjects: response,
projectInProcess: false,
projectLoadFailed: false,
};
}),
on(rootActions.getAllProjectsError, (state) => {
return {
...state,
allProjects: null,
projectInProcess: false,
projectLoadFailed: true,
};
})
);
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,10 @@ export const selectProjectInProcess = createSelector(
selectRootState,
(rootState: IRootState) => rootState.projectInProcess
);

/** One selector keeps project data and its request outcome consistent for guards. */
export const selectProjectAccessState = createSelector(selectRootState, (state: IRootState) => ({
projects: state.allProjects,
loading: state.projectInProcess,
failed: state.projectLoadFailed,
}));
Loading
Loading