Skip to content

Commit 4317cb0

Browse files
authored
Merge pull request #3 from widgrensit/feat/angular20-ionic8-rewrite
rewrite for v2 and updated to latest angular and ionic
2 parents ee200d9 + accfa1f commit 4317cb0

File tree

131 files changed

+16338
-16060
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

131 files changed

+16338
-16060
lines changed

browserslist renamed to .browserslistrc

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,14 @@
22
# For additional information regarding the format and rule options, please see:
33
# https://github.com/browserslist/browserslist#queries
44

5+
# For the full list of supported browsers by the Angular framework, please see:
6+
# https://angular.dev/reference/versions#browser-support
7+
58
# You can see what browsers were selected by your queries by running:
69
# npx browserslist
710

8-
> 0.5%
9-
last 2 versions
10-
Firefox ESR
11-
not dead
12-
not IE 9-11 # For IE 9-11 support, remove 'not'.
11+
Chrome >=107
12+
Firefox >=106
13+
Edge >=107
14+
Safari >=16.1
15+
iOS >=16.1

.editorconfig

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Editor configuration, see https://editorconfig.org
2+
root = true
3+
4+
[*]
5+
charset = utf-8
6+
indent_style = space
7+
indent_size = 2
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
11+
[*.ts]
12+
quote_type = single
13+
14+
[*.md]
15+
max_line_length = off
16+
trim_trailing_whitespace = false

.eslintrc.json

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
{
2+
"root": true,
3+
"ignorePatterns": ["projects/**/*"],
4+
"overrides": [
5+
{
6+
"files": ["*.ts"],
7+
"parserOptions": {
8+
"project": ["tsconfig.json"],
9+
"createDefaultProgram": true
10+
},
11+
"extends": [
12+
"plugin:@angular-eslint/recommended",
13+
"plugin:@angular-eslint/template/process-inline-templates"
14+
],
15+
"rules": {
16+
"@angular-eslint/prefer-standalone": "off",
17+
"@angular-eslint/component-class-suffix": [
18+
"error",
19+
{
20+
"suffixes": ["Page", "Component"]
21+
}
22+
],
23+
"@angular-eslint/component-selector": [
24+
"error",
25+
{
26+
"type": "element",
27+
"prefix": "app",
28+
"style": "kebab-case"
29+
}
30+
],
31+
"@angular-eslint/directive-selector": [
32+
"error",
33+
{
34+
"type": "attribute",
35+
"prefix": "app",
36+
"style": "camelCase"
37+
}
38+
]
39+
}
40+
},
41+
{
42+
"files": ["*.html"],
43+
"extends": ["plugin:@angular-eslint/template/recommended"],
44+
"rules": {}
45+
}
46+
]
47+
}

.gitignore

Lines changed: 51 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,26 +6,65 @@
66
.tmp
77
*.tmp
88
*.tmp.*
9-
*.sublime-project
10-
*.sublime-workspace
11-
.DS_Store
12-
Thumbs.db
139
UserInterfaceState.xcuserstate
1410
$RECYCLE.BIN/
1511

1612
*.log
1713
log.txt
18-
npm-debug.log*
1914

20-
/.idea
21-
/.ionic
22-
/.sass-cache
15+
2316
/.sourcemaps
2417
/.versions
25-
/.vscode
2618
/coverage
27-
/dist
28-
/node_modules
19+
20+
# Ionic
21+
/.ionic
22+
/www
2923
/platforms
3024
/plugins
31-
/www
25+
26+
# Compiled output
27+
/dist
28+
/tmp
29+
/out-tsc
30+
/bazel-out
31+
32+
# Node
33+
/node_modules
34+
npm-debug.log
35+
yarn-error.log
36+
37+
# IDEs and editors
38+
.idea/
39+
.project
40+
.classpath
41+
.c9/
42+
*.launch
43+
.settings/
44+
*.sublime-project
45+
*.sublime-workspace
46+
47+
# Visual Studio Code
48+
.vscode/*
49+
!.vscode/settings.json
50+
!.vscode/tasks.json
51+
!.vscode/launch.json
52+
!.vscode/extensions.json
53+
.history/*
54+
55+
56+
# Miscellaneous
57+
/.angular
58+
/.angular/cache
59+
.sass-cache/
60+
/.nx
61+
/.nx/cache
62+
/connect.lock
63+
/coverage
64+
/libpeerconnection.log
65+
testem.log
66+
/typings
67+
68+
# System files
69+
.DS_Store
70+
Thumbs.db

CLAUDE.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# chat_app
2+
3+
Angular 10 / Ionic 5 frontend for the Chatli messaging platform.
4+
5+
## Stack
6+
- TypeScript, Angular 10, Ionic 5
7+
- Capacitor for native mobile builds
8+
- JWT-based auth (jwt-decode)
9+
- WebSocket for real-time messaging
10+
11+
## Build & run
12+
```bash
13+
npm install
14+
npm start # Dev server
15+
npm run build -- --prod # Production build
16+
docker build -t fra/chatapp . && docker run -p 8100:8100 fra/chatapp
17+
```
18+
19+
## Test
20+
```bash
21+
npm test # Karma + Jasmine
22+
npm run e2e # Protractor
23+
npm run lint # TSLint
24+
```
25+
26+
## Backend connection
27+
- REST API: http://localhost:8090/v1 (public), http://localhost:8090/client (auth required)
28+
- WebSocket: ws://localhost:8090/client/device/:deviceid/user/:userid/ws
29+
30+
## Structure
31+
- `src/app/pages/` — page components (login, signup, chat, main)
32+
- `src/app/services/` — auth, chat, message, storage services
33+
- `src/app/models/` — data models (user, chat, message, participant)
34+
- `src/app/helpers/` — HTTP interceptors (auth token injection, error handling)
35+
- `src/app/guards/` — route guards

Dockerfile

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
FROM agileek/ionic-framework
1+
FROM node:22-alpine AS build
22

3-
COPY . /app
4-
5-
EXPOSE 8100
63
WORKDIR /app
7-
8-
RUN npm install @angular/cli -git
9-
RUN npm install
10-
11-
CMD ["ionic", "serve"]
4+
COPY package.json package-lock.json ./
5+
RUN npm ci
6+
COPY . .
7+
RUN npx ng build --configuration production
8+
9+
FROM nginx:alpine
10+
COPY --from=build /app/www/browser /usr/share/nginx/html
11+
EXPOSE 80

README.md

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,26 @@
1-
## Building with docker
1+
# Chat App
22

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

5-
```
6-
$ docker build -t fra/chatapp .
5+
## Development
6+
7+
```bash
8+
npm install
9+
npm start
710
```
811

9-
Run from docker (after building it):
12+
Visit http://localhost:4200
1013

14+
## Building with Docker
15+
16+
```bash
17+
docker build -t fra/chatapp .
18+
docker run -ti --rm -p 80:80 fra/chatapp
1119
```
12-
$ docker run -ti --rm -p 8100:8100 fra/chatapp
13-
```
1420

21+
Visit http://localhost
22+
23+
## Backend connection
1524

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

0 commit comments

Comments
 (0)