Skip to content
Merged
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
13 changes: 8 additions & 5 deletions browserslist → .browserslistrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@
# For additional information regarding the format and rule options, please see:
# https://github.com/browserslist/browserslist#queries

# For the full list of supported browsers by the Angular framework, please see:
# https://angular.dev/reference/versions#browser-support

# You can see what browsers were selected by your queries by running:
# npx browserslist

> 0.5%
last 2 versions
Firefox ESR
not dead
not IE 9-11 # For IE 9-11 support, remove 'not'.
Chrome >=107
Firefox >=106
Edge >=107
Safari >=16.1
iOS >=16.1
16 changes: 16 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Editor configuration, see https://editorconfig.org
root = true

[*]
charset = utf-8
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true

[*.ts]
quote_type = single

[*.md]
max_line_length = off
trim_trailing_whitespace = false
47 changes: 47 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"root": true,
"ignorePatterns": ["projects/**/*"],
"overrides": [
{
"files": ["*.ts"],
"parserOptions": {
"project": ["tsconfig.json"],
"createDefaultProgram": true
},
"extends": [
"plugin:@angular-eslint/recommended",
"plugin:@angular-eslint/template/process-inline-templates"
],
"rules": {
"@angular-eslint/prefer-standalone": "off",
"@angular-eslint/component-class-suffix": [
"error",
{
"suffixes": ["Page", "Component"]
}
],
"@angular-eslint/component-selector": [
"error",
{
"type": "element",
"prefix": "app",
"style": "kebab-case"
}
],
"@angular-eslint/directive-selector": [
"error",
{
"type": "attribute",
"prefix": "app",
"style": "camelCase"
}
]
}
},
{
"files": ["*.html"],
"extends": ["plugin:@angular-eslint/template/recommended"],
"rules": {}
}
]
}
63 changes: 51 additions & 12 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,65 @@
.tmp
*.tmp
*.tmp.*
*.sublime-project
*.sublime-workspace
.DS_Store
Thumbs.db
UserInterfaceState.xcuserstate
$RECYCLE.BIN/

*.log
log.txt
npm-debug.log*

/.idea
/.ionic
/.sass-cache

/.sourcemaps
/.versions
/.vscode
/coverage
/dist
/node_modules

# Ionic
/.ionic
/www
/platforms
/plugins
/www

# Compiled output
/dist
/tmp
/out-tsc
/bazel-out

# Node
/node_modules
npm-debug.log
yarn-error.log

# IDEs and editors
.idea/
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-project
*.sublime-workspace

# Visual Studio Code
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
.history/*


# Miscellaneous
/.angular
/.angular/cache
.sass-cache/
/.nx
/.nx/cache
/connect.lock
/coverage
/libpeerconnection.log
testem.log
/typings

# System files
.DS_Store
Thumbs.db
35 changes: 35 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# chat_app

Angular 10 / Ionic 5 frontend for the Chatli messaging platform.

## Stack
- TypeScript, Angular 10, Ionic 5
- Capacitor for native mobile builds
- JWT-based auth (jwt-decode)
- WebSocket for real-time messaging

## Build & run
```bash
npm install
npm start # Dev server
npm run build -- --prod # Production build
docker build -t fra/chatapp . && docker run -p 8100:8100 fra/chatapp
```

## Test
```bash
npm test # Karma + Jasmine
npm run e2e # Protractor
npm run lint # TSLint
```

## Backend connection
- REST API: http://localhost:8090/v1 (public), http://localhost:8090/client (auth required)
- WebSocket: ws://localhost:8090/client/device/:deviceid/user/:userid/ws

## Structure
- `src/app/pages/` — page components (login, signup, chat, main)
- `src/app/services/` — auth, chat, message, storage services
- `src/app/models/` — data models (user, chat, message, participant)
- `src/app/helpers/` — HTTP interceptors (auth token injection, error handling)
- `src/app/guards/` — route guards
18 changes: 9 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
FROM agileek/ionic-framework
FROM node:22-alpine AS build

COPY . /app

EXPOSE 8100
WORKDIR /app

RUN npm install @angular/cli -git
RUN npm install

CMD ["ionic", "serve"]
COPY package.json package-lock.json ./
RUN npm ci
COPY . .
RUN npx ng build --configuration production

FROM nginx:alpine
COPY --from=build /app/www/browser /usr/share/nginx/html
EXPOSE 80
26 changes: 18 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,26 @@
## Building with docker
# Chat App

From the terminal:
Browser-based chat client for the Chatli messaging backend. Built with Angular 20 and Ionic 8.

```
$ docker build -t fra/chatapp .
## Development

```bash
npm install
npm start
```

Run from docker (after building it):
Visit http://localhost:4200

## Building with Docker

```bash
docker build -t fra/chatapp .
docker run -ti --rm -p 80:80 fra/chatapp
```
$ docker run -ti --rm -p 8100:8100 fra/chatapp
```

Visit http://localhost

## Backend connection

To use the app visit http://localhost:8100
- REST API: http://localhost:8090/v1 (public), http://localhost:8090/client (auth required)
- WebSocket: ws://localhost:8090/client/device/:deviceid/user/:userid/ws
Loading
Loading