Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vdom of settings #8

Open
wants to merge 43 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
8d425bb
Issues
AlexeyBMSTU Oct 6, 2024
f450f2c
add webpack ts
AlexeyBMSTU Oct 6, 2024
3d2ee58
local front+back
AlexeyBMSTU Oct 11, 2024
f067267
Роутинг + лента
AlexeyBMSTU Oct 12, 2024
aada509
SPA with referens
AlexeyBMSTU Oct 12, 2024
6e9eec7
SPA with referens
AlexeyBMSTU Oct 12, 2024
fcb02fc
virtualDOM+JSX
AlexeyBMSTU Oct 15, 2024
1289b7b
virtualDOM+JSX
AlexeyBMSTU Oct 15, 2024
9362be4
лента+лайки
AlexeyBMSTU Oct 19, 2024
222f85f
лента+профиль+донат+лайки
AlexeyBMSTU Oct 19, 2024
dcbe34b
depl
AlexeyBMSTU Oct 19, 2024
1a62efb
depl
AlexeyBMSTU Oct 19, 2024
1fbe76f
поправил роутинг
AlexeyBMSTU Oct 20, 2024
8281c08
поправил роутинг
AlexeyBMSTU Oct 20, 2024
18cfa90
деплой
AlexeyBMSTU Oct 20, 2024
2ce53f2
деплой
AlexeyBMSTU Oct 20, 2024
822699c
деплой
AlexeyBMSTU Oct 20, 2024
022dedb
деплой
AlexeyBMSTU Oct 20, 2024
f3e902d
деплой
AlexeyBMSTU Oct 20, 2024
b2971e4
уведомления
AlexeyBMSTU Oct 20, 2024
9674ef9
уведомления
AlexeyBMSTU Oct 20, 2024
f507b5f
адаптивку внес
AlexeyBMSTU Oct 20, 2024
1bdfe9f
профиль адаптивный
AlexeyBMSTU Oct 20, 2024
68c0cc2
адаптивное
AlexeyBMSTU Oct 20, 2024
f942a18
дизайн домашней стр
AlexeyBMSTU Oct 21, 2024
b9aff4a
дизайн домашней страницы
AlexeyBMSTU Oct 21, 2024
5393f7c
дизайн на первой странице
AlexeyBMSTU Oct 21, 2024
1926500
create settings
KhovenOlya Oct 22, 2024
6c0330c
create settings
KhovenOlya Oct 22, 2024
a759bd5
edit settings
KhovenOlya Oct 22, 2024
00f2497
валидация регистрации
AlexeyBMSTU Oct 23, 2024
ae40f4b
валидация регистрации
AlexeyBMSTU Oct 23, 2024
328167a
fix bags
KhovenOlya Oct 26, 2024
6ec2d72
vdom кроме профиля
AlexeyBMSTU Oct 28, 2024
81b0449
vdom in feed
AlexeyBMSTU Oct 28, 2024
f88f468
vdom in feed
AlexeyBMSTU Oct 28, 2024
95e346c
vdom in feed
AlexeyBMSTU Oct 28, 2024
9d42475
vdom done
AlexeyBMSTU Oct 29, 2024
24166ef
delete dist
KhovenOlya Oct 29, 2024
715492c
merge
KhovenOlya Oct 29, 2024
1d0727b
new
AlexeyBMSTU Oct 29, 2024
1107f91
merge new
KhovenOlya Oct 29, 2024
fd15cd0
create vdom
KhovenOlya Nov 3, 2024
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
14 changes: 14 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"plugins": ["babel-plugin-rewire"],
"presets": [
"@babel/preset-typescript",
[
"@babel/preset-env",
{
"targets": {
"node": "current"
}
}
]
]
}
10 changes: 10 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"extends": [
"plugin:@typescript-eslint/recommended",
"prettier/@typescript-eslint"
],
"plugins": ["@typescript-eslint", "prettier"],
"rules": {
"prettier/prettier": "error"
}
}
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
![Logotype](https://i.pinimg.com/originals/7e/1b/fe/7e1bfe4493d852515f56a02dfba603b0.png)

<h3> Проект посвящен созданию сервиса на подобии <a href="https://www.patreon.com/">Patreon</a> </h3>
<p> Funtreon - это платформа по подписке, которая позволяет создателям делиться своими страстями с миром, а также строить лояльное сообщество поклонников на территории РФ </p>
<p> Pushart - это платформа по подписке, которая позволяет создателям делиться своими страстями с миром, а также строить лояльное сообщество поклонников на территории РФ </p>
<p> Наша идея - обеспечить беспроблемный и безопасный способ для создателей монетизировать свой контент, а для фанатов - поддерживать своих
любимых артистов, писателей, музыкантов и многих других</p>
<p> Для запуска необходимо ввести в терминал следующее: npm install && node ./src/server/server.js <p>
<p> Для запуска необходимо ввести в терминал следующее: npm install && npm run start <p>

## Деплой

Expand Down
47 changes: 36 additions & 11 deletions deploy/nginx/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ server {
listen 80 default_server;
listen [::]:80 default_server;

root /var/www/mysite/src;
root /var/www/mysite/dist;


index index.html index.htm index.nginx-debian.html;
Expand All @@ -11,27 +11,52 @@ server {

location ~* ^.+\.(jpg|png|js|gif)$ {
valid_referers pushart.online www.pushart.online;
if ($invalid_referer) {
return 403;
}
if ($invalid_referer) {
return 403;
}
}
location ^~ /api/profile {
proxy_pass http://backend_profile/profile;
add_header 'Access-Control-Allow-Origin' '*' always;
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS' always;
add_header 'Access-Control-Allow-Headers' 'Origin, X-Requested-With, Content-Type, Accept' always;
proxy_pass http://backend_profile/profile;
}

location ^~ /api/profile/ {
proxy_pass http://backend_profile/profile/;
add_header 'Access-Control-Allow-Origin' '*' always;
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS' always;
add_header 'Access-Control-Allow-Headers' 'Origin, X-Requested-With, Content-Type, Accept' always;
proxy_pass http://backend_profile/profile/;
}

location ^~ /api/ {
proxy_pass http://backend/;
add_header 'Access-Control-Allow-Origin' '*' always;
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS' always;
add_header 'Access-Control-Allow-Headers' 'Origin, X-Requested-With, Content-Type, Accept' always;
proxy_pass http://backend/;
}

location ^~ /styles/ {
alias /var/www/mysite/src/styles/;
}
location ^~ /styles/ {
alias /var/www/mysite/dist;
}

location / {
location / {
try_files $uri $uri/ /index.html;
error_page 404 = /error.html;
}
location ~* \.css$ {
add_header Content-Type text/css;
}

location ~* \.js$ {
add_header Content-Type application/javascript;
}

location = /feed/bundle.js {
return 301 /bundle.js;
}
location = /bundle.js {
allow all;
}
}

Binary file added dist/513c5c98056633bcdda1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
916 changes: 916 additions & 0 deletions dist/bundle.js

Large diffs are not rendered by default.

Binary file added dist/ed6b6d52d9ed8493be63.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions dist/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!doctype html>
<html lang="ru">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<script defer src="/bundle.js"></script>
</head>
<body>
<div id="root"></div>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/purify.min.js"></script>
</body>
</html>
2 changes: 1 addition & 1 deletion eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module.exports = [
{
files: ["*.js"],
files: ["*.js", "*.ts"],
languageOptions: {
globals: {
require: true,
Expand Down
7 changes: 7 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// jest.config.js
module.exports = {
testEnvironment: "jsdom",
moduleNameMapper: {
"\\.(css|less|scss)$": "identity-obj-proxy",
},
};
Loading