Skip to content

Commit 698f94b

Browse files
feat: include rtc
1 parent 0edd637 commit 698f94b

Some content is hidden

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

64 files changed

+13391
-4
lines changed

.gitignore

+12-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,17 @@
11
# Virtual environment
22
venv
33

4-
# Python specific
4+
# Python
55
__pycache__
66

7-
# Django specific
8-
db.sqlite3
7+
# Django
8+
db.sqlite3
9+
10+
# Webpack
11+
dist
12+
13+
# npm
14+
node_modules
15+
16+
# Jest
17+
coverage

LICENCE

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
2+
MIT License
3+
4+
Copyright (c) 2020 Marcelo Cardoso
5+
6+
Permission is hereby granted, free of charge, to any person obtaining a copy
7+
of this software and associated documentation files (the "Software"), to deal
8+
in the Software without restriction, including without limitation the rights
9+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10+
copies of the Software, and to permit persons to whom the Software is
11+
furnished to do so, subject to the following conditions:
12+
13+
The above copyright notice and this permission notice shall be included in all
14+
copies or substantial portions of the Software.
15+
16+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22+
SOFTWARE.

README.md

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# 🍰 react-typescript-django
2+
3+
## Features
4+
5+
- UI library:
6+
7+
1. **React**
8+
9+
- State management solution:
10+
11+
1. **React's Context API**
12+
13+
- Styling system:
14+
15+
1. **Styed Components**
16+
17+
- Unit testing library:
18+
19+
1. **React Testing Library**
20+
21+
- CMS
22+
23+
1. **Django**
24+
25+
- REST API
26+
27+
1. **Django Rest Framework**
28+
29+
- Database
30+
31+
1. **PostgreSQL**

frontend/.gitlab-ci.yml

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
image: node:12
2+
3+
stages:
4+
- check
5+
- build
6+
- test
7+
8+
NPM Audit:
9+
stage: check
10+
allow_failure: true
11+
script:
12+
- npm audit
13+
14+
Static Test:
15+
stage: check
16+
before_script:
17+
- npm ci
18+
script:
19+
- npm run test:static
20+
21+
Build:
22+
stage: build
23+
before_script:
24+
- npm ci
25+
script:
26+
- npm build
27+
28+
Unit Test:
29+
stage: test
30+
before_script:
31+
- npm ci
32+
script:
33+
- npm test

frontend/babel.config.js

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
module.exports = {
2+
presets: [
3+
"@babel/preset-typescript",
4+
"@babel/preset-env",
5+
"@babel/preset-react"
6+
],
7+
plugins: [
8+
"@babel/plugin-transform-runtime",
9+
"@babel/plugin-syntax-dynamic-import",
10+
"@babel/plugin-transform-modules-commonjs",
11+
"@babel/plugin-proposal-optional-chaining",
12+
[
13+
"@babel/plugin-proposal-decorators",
14+
{
15+
legacy: true
16+
}
17+
],
18+
[
19+
"@babel/plugin-proposal-class-properties",
20+
{
21+
loose: true
22+
}
23+
]
24+
]
25+
};

frontend/commitlint.config.js

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = { extends: ["@commitlint/config-conventional"] };
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,216 @@
1+
// Jest Snapshot v1, https://goo.gl/fbAQLP
2+
3+
exports[`<Button /> test case explicitly renders the primary style 1`] = `
4+
.c0 {
5+
position: relative;
6+
border-color: transparent;
7+
outline: none;
8+
border-top-left-radius: 16px;
9+
border-top-right-radius: 16px;
10+
border-bottom-right-radius: 18px;
11+
border-bottom-left-radius: 18px;
12+
border-width: 0 0 4px;
13+
padding: 13px 16px;
14+
background-color: #78c800;
15+
color: #fff;
16+
cursor: pointer;
17+
}
18+
19+
.c0:after {
20+
position: absolute;
21+
background-color: #58a700;
22+
border-color: transparent;
23+
border-width: 0 0 4px;
24+
border-radius: 16px;
25+
bottom: -8px;
26+
content: "";
27+
left: 0;
28+
right: 0;
29+
z-index: -1;
30+
top: 0;
31+
}
32+
33+
.c0:focus {
34+
outline: none;
35+
}
36+
37+
.c1 {
38+
position: relative;
39+
text-transform: uppercase;
40+
font-weight: bold;
41+
top: 1px;
42+
}
43+
44+
<button
45+
class="c0"
46+
data-testid="styledButton"
47+
>
48+
<span
49+
class="c1"
50+
data-testid="label"
51+
>
52+
Click me
53+
</span>
54+
</button>
55+
`;
56+
57+
exports[`<Button /> test case implicitly renders the primary style 1`] = `
58+
.c0 {
59+
position: relative;
60+
border-color: transparent;
61+
outline: none;
62+
border-top-left-radius: 16px;
63+
border-top-right-radius: 16px;
64+
border-bottom-right-radius: 18px;
65+
border-bottom-left-radius: 18px;
66+
border-width: 0 0 4px;
67+
padding: 13px 16px;
68+
background-color: #78c800;
69+
color: #fff;
70+
cursor: pointer;
71+
}
72+
73+
.c0:after {
74+
position: absolute;
75+
background-color: #58a700;
76+
border-color: transparent;
77+
border-width: 0 0 4px;
78+
border-radius: 16px;
79+
bottom: -8px;
80+
content: "";
81+
left: 0;
82+
right: 0;
83+
z-index: -1;
84+
top: 0;
85+
}
86+
87+
.c0:focus {
88+
outline: none;
89+
}
90+
91+
.c1 {
92+
position: relative;
93+
text-transform: uppercase;
94+
font-weight: bold;
95+
top: 1px;
96+
}
97+
98+
<button
99+
class="c0"
100+
data-testid="styledButton"
101+
>
102+
<span
103+
class="c1"
104+
data-testid="label"
105+
>
106+
Click me
107+
</span>
108+
</button>
109+
`;
110+
111+
exports[`<Button /> test case renders secondary style 1`] = `
112+
.c0 {
113+
position: relative;
114+
border-color: transparent;
115+
outline: none;
116+
border-top-left-radius: 16px;
117+
border-top-right-radius: 16px;
118+
border-bottom-right-radius: 18px;
119+
border-bottom-left-radius: 18px;
120+
border-width: 0 0 4px;
121+
padding: 13px 16px;
122+
background-color: #fff;
123+
color: #0b3e71;
124+
cursor: pointer;
125+
}
126+
127+
.c0:after {
128+
position: absolute;
129+
background-color: rgba(255,255,255,0.5) border-color:transparent;
130+
border-width: 0 0 4px;
131+
border-radius: 16px;
132+
bottom: -8px;
133+
content: "";
134+
left: 0;
135+
right: 0;
136+
z-index: -1;
137+
top: 0;
138+
}
139+
140+
.c0:focus {
141+
outline: none;
142+
}
143+
144+
.c1 {
145+
position: relative;
146+
text-transform: uppercase;
147+
font-weight: bold;
148+
top: 1px;
149+
}
150+
151+
<button
152+
class="c0"
153+
data-testid="styledButton"
154+
>
155+
<span
156+
class="c1"
157+
data-testid="label"
158+
>
159+
Click me
160+
</span>
161+
</button>
162+
`;
163+
164+
exports[`<Button /> test case renders tertiary style 1`] = `
165+
.c0 {
166+
position: relative;
167+
border-color: transparent;
168+
outline: none;
169+
border-top-left-radius: 16px;
170+
border-top-right-radius: 16px;
171+
border-bottom-right-radius: 18px;
172+
border-bottom-left-radius: 18px;
173+
border-width: 0 0 4px;
174+
padding: 13px 16px;
175+
background-color: #1cb0f6;
176+
color: #fff;
177+
cursor: pointer;
178+
}
179+
180+
.c0:after {
181+
position: absolute;
182+
background-color: #1899d6;
183+
border-color: transparent;
184+
border-width: 0 0 4px;
185+
border-radius: 16px;
186+
bottom: -8px;
187+
content: "";
188+
left: 0;
189+
right: 0;
190+
z-index: -1;
191+
top: 0;
192+
}
193+
194+
.c0:focus {
195+
outline: none;
196+
}
197+
198+
.c1 {
199+
position: relative;
200+
text-transform: uppercase;
201+
font-weight: bold;
202+
top: 1px;
203+
}
204+
205+
<button
206+
class="c0"
207+
data-testid="styledButton"
208+
>
209+
<span
210+
class="c1"
211+
data-testid="label"
212+
>
213+
Click me
214+
</span>
215+
</button>
216+
`;

0 commit comments

Comments
 (0)