Skip to content

Commit 74990b4

Browse files
authored
#12 Frontend init (#50)
1 parent e1b8ce1 commit 74990b4

20 files changed

+6769
-0
lines changed

compose.yml

+5
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,8 @@ services:
4949
interval: 1s
5050
timeout: 1s
5151
retries: 16
52+
tg-miniapp:
53+
build:
54+
context: frontend
55+
ports:
56+
- "443:443"

frontend/.eslintrc.cjs

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
module.exports = {
2+
env: {
3+
browser: true,
4+
es2021: true
5+
},
6+
extends: [
7+
'eslint:recommended',
8+
'plugin:@typescript-eslint/recommended',
9+
'plugin:react/recommended'
10+
],
11+
overrides: [
12+
{
13+
env: {
14+
node: true
15+
},
16+
files: [
17+
'.eslintrc.{js,cjs}'
18+
],
19+
parserOptions: {
20+
'sourceType': 'script'
21+
}
22+
}
23+
],
24+
parser: '@typescript-eslint/parser',
25+
parserOptions: {
26+
ecmaVersion: 'latest',
27+
sourceType: 'module'
28+
},
29+
plugins: [
30+
'@typescript-eslint',
31+
'react'
32+
],
33+
rules: {
34+
'react/react-in-jsx-scope': 0,
35+
}
36+
};

frontend/.gitignore

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# dependencies
2+
/node_modules
3+
/.pnp
4+
.pnp.js
5+
6+
# testing
7+
/coverage
8+
9+
# production
10+
/build
11+
/dist
12+
13+
# misc
14+
.DS_Store
15+
.env.local
16+
.env.development.local
17+
.env.test.local
18+
.env.production.local
19+
20+
npm-debug.log*
21+
yarn-debug.log*
22+
yarn-error.log*

frontend/Dockerfile

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
FROM node:alpine
2+
3+
WORKDIR /miniapp
4+
5+
COPY package*.json ./
6+
7+
RUN npm install
8+
9+
COPY dist ./dist
10+
11+
COPY vite.config.ts .
12+
13+
EXPOSE 443
14+
15+
CMD ["npm", "run", "preview"]

frontend/README.md

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# ITMO Dating telegram mini app
2+
3+
## Stack
4+
React, Vite, TelegramUI, TelegramSDK

frontend/frontend.iml

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<module type="WEB_MODULE" version="4">
3+
<component name="NewModuleRootManager" inherit-compiler-output="true">
4+
<exclude-output />
5+
<content url="file://$MODULE_DIR$" />
6+
<orderEntry type="sourceFolder" forTests="false" />
7+
</component>
8+
</module>

frontend/index.html

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8"/>
5+
<meta name="viewport" content="width=device-width, initial-scale=1"/>
6+
<meta name="theme-color" content="#000000"/>
7+
<title>ITMO Dating</title>
8+
</head>
9+
<body>
10+
<noscript>You need to enable JavaScript to run this app.</noscript>
11+
<div id="root"></div>
12+
<script src="/src/index.tsx" type="module"></script>
13+
</body>
14+
</html>

0 commit comments

Comments
 (0)