Skip to content

Commit

Permalink
feat: new react client instead of the old flutter client
Browse files Browse the repository at this point in the history
  • Loading branch information
Elbarae1921 committed Feb 8, 2025
1 parent 6a857e7 commit a2bb321
Show file tree
Hide file tree
Showing 56 changed files with 1,533 additions and 1,381 deletions.
64 changes: 21 additions & 43 deletions client/.gitignore
Original file line number Diff line number Diff line change
@@ -1,46 +1,24 @@
# Miscellaneous
*.class
# Logs
logs
*.log
*.pyc
*.swp
.DS_Store
.atom/
.buildlog/
.history
.svn/
migrate_working_dir/

# IntelliJ related
*.iml
*.ipr
*.iws
.idea/

# The .vscode folder contains launch configuration and tasks you configure in
# VS Code which you may wish to be included in version control, so this line
# is commented out by default.
#.vscode/

# Flutter/Dart/Pub related
**/doc/api/
**/ios/Flutter/.last_build_id
.dart_tool/
.flutter-plugins
.flutter-plugins-dependencies
.packages
.pub-cache/
.pub/
/build/
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

# Web related
node_modules
dist
dist-ssr
*.local

# Symbolication related
app.*.symbols

# Obfuscation related
app.*.map.json

# Android Studio will place build artifacts here
/android/app/debug
/android/app/profile
/android/app/release
# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
30 changes: 0 additions & 30 deletions client/.metadata

This file was deleted.

25 changes: 0 additions & 25 deletions client/.vscode/launch.json

This file was deleted.

35 changes: 12 additions & 23 deletions client/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,27 +1,16 @@
ARG ARCH=linux/amd64

FROM --platform=${ARCH} dart:3.3

ARG API_AUTHORITY

RUN apt-get update && apt-get install -y unzip wget xz-utils

WORKDIR /usr

RUN git clone https://github.com/flutter/flutter.git /usr/local/flutter
ENV PATH "$PATH:/usr/local/flutter/bin:/usr/local/flutter/bin/cache/dart-sdk/bin"

# Install webdev
RUN flutter pub global activate webdev

# Set the PATH environment variable for the webdev executable
ENV PATH "$PATH:/root/.pub-cache/bin"

FROM node:18-alpine as build
WORKDIR /app

COPY package.json ./
COPY yarn.lock ./
RUN yarn --frozen-lockfile
COPY . .
RUN yarn build

RUN flutter pub get

# Build the Flutter application for the web
RUN flutter build web --release --dart-define API_AUTHORITY=${API_AUTHORITY}
FROM node:18-alpine
WORKDIR /app
ENV NODE_ENV=production
COPY package.json ./
COPY yarn.lock ./
COPY --from=build /app/dist ./dist/
RUN ls -a
16 changes: 0 additions & 16 deletions client/README.md

This file was deleted.

7 changes: 0 additions & 7 deletions client/analysis_options.yaml

This file was deleted.

28 changes: 28 additions & 0 deletions client/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import js from '@eslint/js'
import globals from 'globals'
import reactHooks from 'eslint-plugin-react-hooks'
import reactRefresh from 'eslint-plugin-react-refresh'
import tseslint from 'typescript-eslint'

export default tseslint.config(
{ ignores: ['dist'] },
{
extends: [js.configs.recommended, ...tseslint.configs.recommended],
files: ['**/*.{ts,tsx}'],
languageOptions: {
ecmaVersion: 2020,
globals: globals.browser,
},
plugins: {
'react-hooks': reactHooks,
'react-refresh': reactRefresh,
},
rules: {
...reactHooks.configs.recommended.rules,
'react-refresh/only-export-components': [
'warn',
{ allowConstantExport: true },
],
},
},
)
18 changes: 18 additions & 0 deletions client/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Toiki</title>
<base href="/" />

<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png" />
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png" />
<link rel="manifest" href="/site.webmanifest" />
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>
28 changes: 0 additions & 28 deletions client/lib/blocs/conversion/conversion_bloc.dart

This file was deleted.

7 changes: 0 additions & 7 deletions client/lib/blocs/conversion/conversion_event.dart

This file was deleted.

15 changes: 0 additions & 15 deletions client/lib/blocs/conversion/conversion_state.dart

This file was deleted.

27 changes: 0 additions & 27 deletions client/lib/core/app.dart

This file was deleted.

28 changes: 0 additions & 28 deletions client/lib/core/bloc_providers.dart

This file was deleted.

25 changes: 0 additions & 25 deletions client/lib/core/repository_providers.dart

This file was deleted.

10 changes: 0 additions & 10 deletions client/lib/exceptions/http_bad_request_exception.dart

This file was deleted.

7 changes: 0 additions & 7 deletions client/lib/exceptions/http_entity_not_found_exception.dart

This file was deleted.

Loading

0 comments on commit a2bb321

Please sign in to comment.