├── .gitignore
├── .vscode
└── settings.json
├── Docker
├── Goose
│ └── Dockerfile
├── Horse
│ └── Dockerfile
└── PostgreSQL
│ ├── Dockerfile
│ └── init.d
│ └── init-database.sh
├── KanbanaApi.deployproj
├── KanbanaApi.dpr
├── KanbanaApi.dproj
├── KanbanaApi.res
├── LICENSE
├── README.md
├── Src
├── Migrations
│ ├── 21052019202900_create_table_boards.sql
│ ├── 21052019203000_create_table_sections.sql
│ ├── 21052019203100_create_table_tasks.sql
│ └── 23072019011200_create_table_users.sql
├── configs
│ ├── Kanbana.Configs.Encrypt.pas
│ └── Kanbana.Configs.Login.pas
├── controllers
│ ├── Kanbana.Controllers.Boards.pas
│ ├── Kanbana.Controllers.Login.pas
│ ├── Kanbana.Controllers.Sections.pas
│ ├── Kanbana.Controllers.Tasks.pas
│ └── Kanbana.Controllers.Users.pas
├── providers
│ ├── Kanbana.Providers.Authorization.pas
│ ├── Kanbana.Providers.Connection.dfm
│ ├── Kanbana.Providers.Connection.pas
│ └── Kanbana.Providers.Encrypt.pas
└── services
│ ├── Kanbana.Services.Boards.dfm
│ ├── Kanbana.Services.Boards.pas
│ ├── Kanbana.Services.Sections.dfm
│ ├── Kanbana.Services.Sections.pas
│ ├── Kanbana.Services.Tasks.dfm
│ ├── Kanbana.Services.Tasks.pas
│ ├── Kanbana.Services.Users.dfm
│ └── Kanbana.Services.Users.pas
├── boss-lock.json
├── boss.json
├── docker-compose.yml
└── kanbana-api.postman_collection.json
/.gitignore:
--------------------------------------------------------------------------------
1 |
2 | # Created by https://www.gitignore.io/api/delphi
3 | # Edit at https://www.gitignore.io/?templates=delphi
4 |
5 | ### Delphi ###
6 | # Uncomment these types if you want even more clean repository. But be careful.
7 | # It can make harm to an existing project source. Read explanations below.
8 | #
9 | # Resource files are binaries containing manifest, project icon and version info.
10 | # They can not be viewed as text or compared by diff-tools. Consider replacing them with .rc files.
11 | #*.res
12 | # Type library file (binary). In old Delphi versions it should be stored.
13 | # Since Delphi 2009 it is produced from .ridl file and can safely be ignored.
14 | #*.tlb
15 | # Diagram Portfolio file. Used by the diagram editor up to Delphi 7.
16 | # Uncomment this if you are not using diagrams or use newer Delphi version.
17 | #*.ddp
18 | # Visual LiveBindings file. Added in Delphi XE2.
19 | # Uncomment this if you are not using LiveBindings Designer.
20 | #*.vlb
21 | # Deployment Manager configuration file for your project. Added in Delphi XE2.
22 | # Uncomment this if it is not mobile development and you do not use remote debug feature.
23 | #*.deployproj
24 | # C++ object files produced when C/C++ Output file generation is configured.
25 | # Uncomment this if you are not using external objects (zlib library for example).
26 | #*.obj
27 |
28 | # Delphi compiler-generated binaries (safe to delete)
29 | *.exe
30 | *.dll
31 | *.bpl
32 | *.bpi
33 | *.dcp
34 | *.so
35 | *.apk
36 | *.drc
37 | *.map
38 | *.dres
39 | *.rsm
40 | *.tds
41 | *.dcu
42 | *.lib
43 | *.a
44 | *.o
45 | *.ocx
46 |
47 | # Delphi autogenerated files (duplicated info)
48 | *.cfg
49 | *.hpp
50 | *Resource.rc
51 |
52 | # Delphi local files (user-specific info)
53 | *.local
54 | *.identcache
55 | *.projdata
56 | *.tvsconfig
57 | *.dsk
58 |
59 | # Plataform
60 | Win32
61 | Win64
62 | Linux64
63 |
64 | # Delphi history and backups
65 | __history/
66 | __recovery/
67 | *.~*
68 |
69 | # Castalia statistics file (since XE7 Castalia is distributed with Delphi)
70 | *.stat
71 |
72 | # Boss dependency manager vendor folder https://github.com/HashLoad/boss
73 | modules/
74 |
75 | # End of https://www.gitignore.io/api/delphi
--------------------------------------------------------------------------------
/.vscode/settings.json:
--------------------------------------------------------------------------------
1 | {
2 | "files.exclude": {
3 | "__*": true,
4 | "*.identcache": true,
5 | "*.local": true,
6 | "*.res": true,
7 | "*.stat": true,
8 | "Linux64": true,
9 | "modules": true,
10 | "Win32": true
11 | }
12 | }
--------------------------------------------------------------------------------
/Docker/Goose/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM hashload/goose
2 | CMD ["bash" , "-c", "waitforit -address=tcp://$GOOSE_HOST:$GOOSE_PORT -timeout=120 -- sleep 3 && goose $GOOSE_DRIVER \"host=$GOOSE_HOST port=$GOOSE_PORT user=$GOOSE_USER dbname=$GOOSE_DATABASE password=$GOOSE_PASSWORD sslmode=disable\" up"]
--------------------------------------------------------------------------------
/Docker/Horse/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM hashload/delphi-dev:10.3.2-rio
2 | RUN apt-get -y update \
3 | && apt-get -y install \
4 | libpq5 \
5 | && ln -s /usr/lib/x86_64-linux-gnu/libpq.so.5 /usr/lib/x86_64-linux-gnu/libpq.so
--------------------------------------------------------------------------------
/Docker/PostgreSQL/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM postgres:10.4
2 | COPY ./initdb.d /docker-entrypoint-initdb.d
--------------------------------------------------------------------------------
/Docker/PostgreSQL/init.d/init-database.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | set -e
3 |
4 | psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" <<-EOSQL
5 | CREATE DATABASE KANBANA;
6 | EOSQL
7 |
--------------------------------------------------------------------------------
/KanbanaApi.deployproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 12
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 | KanbanaApi\
13 | KanbanaApi.exe
14 | ProjectOutput
15 | 0
16 |
17 |
18 | True
19 | True
20 |
21 |
22 |
23 |
24 | KanbanaApi\
25 | KanbanaApi
26 | ProjectOutput
27 | 1
28 |
29 |
30 | True
31 | True
32 |
33 |
34 |
35 |
36 |
37 | KanbanaApi.app\
38 | libcgunwind.1.0.dylib
39 | DependencyModule
40 | 1
41 |
42 |
43 | True
44 |
45 |
46 | KanbanaApi.app\
47 | libpcre.dylib
48 | DependencyModule
49 | 1
50 |
51 |
52 | True
53 |
54 |
55 |
56 |
--------------------------------------------------------------------------------
/KanbanaApi.dpr:
--------------------------------------------------------------------------------
1 | program KanbanaApi;
2 |
3 | {$APPTYPE CONSOLE}
4 | {$R *.res}
5 |
6 | uses
7 | Horse,
8 | Horse.Jhonson,
9 | System.SysUtils,
10 | Kanbana.Controllers.Boards in 'Src\Controllers\Kanbana.Controllers.Boards.pas',
11 | Kanbana.Providers.Connection in 'Src\Providers\Kanbana.Providers.Connection.pas' {ProviderConnection: TDataModule},
12 | Kanbana.Services.Boards in 'Src\Services\Kanbana.Services.Boards.pas' {ServiceBoards: TDataModule},
13 | Kanbana.Controllers.Sections in 'Src\Controllers\Kanbana.Controllers.Sections.pas',
14 | Kanbana.Services.Sections in 'Src\Services\Kanbana.Services.Sections.pas' {ServiceSections: TDataModule},
15 | Kanbana.Controllers.Tasks in 'Src\Controllers\Kanbana.Controllers.Tasks.pas',
16 | Kanbana.Services.Tasks in 'Src\Services\Kanbana.Services.Tasks.pas' {ServiceTasks: TDataModule},
17 | Kanbana.Controllers.Login in 'Src\Controllers\Kanbana.Controllers.Login.pas',
18 | Kanbana.Configs.Login in 'Src\Configs\Kanbana.Configs.Login.pas',
19 | Kanbana.Providers.Authorization in 'Src\Providers\Kanbana.Providers.Authorization.pas',
20 | Kanbana.Services.Users in 'Src\Services\Kanbana.Services.Users.pas' {ServiceUsers: TDataModule},
21 | Kanbana.Providers.Encrypt in 'Src\Providers\Kanbana.Providers.Encrypt.pas',
22 | Kanbana.Configs.Encrypt in 'Src\Configs\Kanbana.Configs.Encrypt.pas',
23 | Kanbana.Controllers.Users in 'Src\Controllers\Kanbana.Controllers.Users.pas';
24 |
25 | begin
26 | ReportMemoryLeaksOnShutdown := True;
27 |
28 | THorse.Use(Jhonson);
29 |
30 | Kanbana.Controllers.Login.Registry;
31 | Kanbana.Controllers.Users.Registry;
32 | Kanbana.Controllers.Boards.Registry;
33 | Kanbana.Controllers.Sections.Registry;
34 | Kanbana.Controllers.Tasks.Registry;
35 |
36 | THorse.Listen(9000,
37 | procedure(Horse: THorse)
38 | begin
39 | Writeln('Server is runing on port ' + THorse.Port.ToString);
40 | Write('Press return to stop...');
41 | ReadLn;
42 | THorse.StopListen;
43 | end);
44 | end.
45 |
--------------------------------------------------------------------------------
/KanbanaApi.dproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | {4EF740D7-899F-4EB6-956E-2E825FAFD2A9}
4 | 18.8
5 | None
6 | KanbanaApi.dpr
7 | True
8 | Debug
9 | Win32
10 | 3
11 | Console
12 |
13 |
14 | true
15 |
16 |
17 | true
18 | Base
19 | true
20 |
21 |
22 | true
23 | Base
24 | true
25 |
26 |
27 | true
28 | Base
29 | true
30 |
31 |
32 | true
33 | Cfg_1
34 | true
35 | true
36 |
37 |
38 | true
39 | Base
40 | true
41 |
42 |
43 | .\$(Platform)\$(Config)
44 | .\$(Platform)\$(Config)
45 | false
46 | false
47 | false
48 | false
49 | false
50 | System;Xml;Data;Datasnap;Web;Soap;$(DCC_Namespace)
51 | KanbanaApi
52 | $(DCC_UnitSearchPath);modules\.dcp;modules\.dcu;modules;modules\dataset-serialize\src;modules\delphi-jose-jwt\Source\Common;modules\delphi-jose-jwt\Source\JOSE;modules\hashlib4pascal\HashLib\src\Base;modules\hashlib4pascal\HashLib\src\Checksum;modules\hashlib4pascal\HashLib\src\Crypto\Blake2BParams;modules\hashlib4pascal\HashLib\src\Crypto\Blake2SParams;modules\hashlib4pascal\HashLib\src\Crypto;modules\hashlib4pascal\HashLib\src\Hash128;modules\hashlib4pascal\HashLib\src\Hash32;modules\hashlib4pascal\HashLib\src\Hash64;modules\hashlib4pascal\HashLib\src\Include;modules\hashlib4pascal\HashLib\src\Interfaces;modules\hashlib4pascal\HashLib\src\Interfaces\IBlake2BParams;modules\hashlib4pascal\HashLib\src\Interfaces\IBlake2SParams;modules\hashlib4pascal\HashLib\src\KDF;modules\hashlib4pascal\HashLib\src\NullDigest;modules\hashlib4pascal\HashLib\src\Nullable;modules\hashlib4pascal\HashLib\src\Packages\FPC;modules\hashlib4pascal\HashLib\src\Utils;modules\hashlib4pascal\HashLib.Benchmark\src\Core;modules\hashlib4pascal\HashLib.Benchmark\src\Forms\FMX;modules\hashlib4pascal\HashLib.Tests\src;modules\horse\src;modules\horse-basic-auth\src;modules\horse-jwt\src;modules\jhonson\src;modules\ragna\src\core;modules\ragna\src\helpers;modules\ragna\src\interfaces;modules\ragna\src\state;modules\ragna\src\types
53 |
54 |
55 | DBXSqliteDriver;RESTComponents;fmxase;DBXDb2Driver;DBXInterBaseDriver;vclactnband;vclFireDAC;emsclientfiredac;tethering;svnui;DataSnapFireDAC;FireDACADSDriver;DBXMSSQLDriver;DatasnapConnectorsFreePascal;FireDACMSSQLDriver;vcltouch;vcldb;bindcompfmx;svn;DBXOracleDriver;inetdb;emsedge;fmx;FireDACIBDriver;fmxdae;FireDACDBXDriver;dbexpress;IndyCore;vclx;dsnap;emsclient;DataSnapCommon;FireDACCommon;RESTBackendComponents;DataSnapConnectors;VCLRESTComponents;soapserver;vclie;bindengine;DBXMySQLDriver;CloudService;FireDACOracleDriver;FireDACMySQLDriver;DBXFirebirdDriver;FireDACCommonODBC;FireDACCommonDriver;DataSnapClient;inet;IndyIPCommon;bindcompdbx;vcl;IndyIPServer;DBXSybaseASEDriver;IndySystem;FireDACDb2Driver;dsnapcon;FireDACMSAccDriver;fmxFireDAC;FireDACInfxDriver;vclimg;FireDAC;emshosting;FireDACSqliteDriver;FireDACPgDriver;FireDACASADriver;DBXOdbcDriver;FireDACTDataDriver;soaprtl;DbxCommonDriver;DataSnapServer;xmlrtl;soapmidas;DataSnapNativeClient;fmxobj;vclwinx;FireDACDSDriver;rtl;emsserverresource;DbxClientDriver;DBXSybaseASADriver;CustomIPTransport;vcldsnap;bindcomp;appanalytics;DBXInformixDriver;IndyIPClient;bindcompvcl;dbxcds;VclSmp;adortl;FireDACODBCDriver;DataSnapIndy10ServerTransport;dsnapxml;DataSnapProviderClient;dbrtl;IndyProtocols;inetdbxpress;FireDACMongoDBDriver;DataSnapServerMidas;DOSCommandDR;$(DCC_UsePackage)
56 | Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)
57 | Debug
58 | CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=
59 | 1033
60 | true
61 | $(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_44.png
62 | $(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_150.png
63 |
64 |
65 | DBXSqliteDriver;RESTComponents;fmxase;DBXDb2Driver;DBXInterBaseDriver;vclactnband;vclFireDAC;emsclientfiredac;tethering;DataSnapFireDAC;FireDACADSDriver;DBXMSSQLDriver;DatasnapConnectorsFreePascal;FireDACMSSQLDriver;vcltouch;vcldb;bindcompfmx;DBXOracleDriver;inetdb;emsedge;fmx;FireDACIBDriver;fmxdae;FireDACDBXDriver;dbexpress;IndyCore;vclx;dsnap;emsclient;DataSnapCommon;FireDACCommon;RESTBackendComponents;DataSnapConnectors;VCLRESTComponents;soapserver;vclie;bindengine;DBXMySQLDriver;CloudService;FireDACOracleDriver;FireDACMySQLDriver;DBXFirebirdDriver;FireDACCommonODBC;FireDACCommonDriver;DataSnapClient;inet;IndyIPCommon;bindcompdbx;vcl;IndyIPServer;DBXSybaseASEDriver;IndySystem;FireDACDb2Driver;dsnapcon;FireDACMSAccDriver;fmxFireDAC;FireDACInfxDriver;vclimg;FireDAC;emshosting;FireDACSqliteDriver;FireDACPgDriver;FireDACASADriver;DBXOdbcDriver;FireDACTDataDriver;soaprtl;DbxCommonDriver;DataSnapServer;xmlrtl;soapmidas;DataSnapNativeClient;fmxobj;vclwinx;FireDACDSDriver;rtl;emsserverresource;DbxClientDriver;DBXSybaseASADriver;CustomIPTransport;vcldsnap;bindcomp;appanalytics;DBXInformixDriver;IndyIPClient;bindcompvcl;dbxcds;VclSmp;adortl;FireDACODBCDriver;DataSnapIndy10ServerTransport;dsnapxml;DataSnapProviderClient;dbrtl;IndyProtocols;inetdbxpress;FireDACMongoDBDriver;DataSnapServerMidas;DOSCommandDR;$(DCC_UsePackage)
66 | true
67 | $(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_44.png
68 | $(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_150.png
69 | Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;$(DCC_Namespace)
70 | Debug
71 | CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=
72 | 1033
73 |
74 |
75 | DEBUG;$(DCC_Define)
76 | true
77 | false
78 | true
79 | true
80 | true
81 |
82 |
83 | false
84 |
85 |
86 | false
87 | RELEASE;$(DCC_Define)
88 | 0
89 | 0
90 |
91 |
92 |
93 | MainSource
94 |
95 |
96 |
97 |
98 | TDataModule
99 |
100 |
101 |
102 | TDataModule
103 |
104 |
105 |
106 |
107 | TDataModule
108 |
109 |
110 |
111 |
112 | TDataModule
113 |
114 |
115 |
116 |
117 |
118 |
119 | TDataModule
120 |
121 |
122 |
123 |
124 |
125 | Cfg_2
126 | Base
127 |
128 |
129 | Base
130 |
131 |
132 | Cfg_1
133 | Base
134 |
135 |
136 |
137 | Delphi.Personality.12
138 | Application
139 |
140 |
141 |
142 | KanbanaApi.dpr
143 |
144 |
145 | Microsoft Office 2000 Sample Automation Server Wrapper Components
146 | Microsoft Office XP Sample Automation Server Wrapper Components
147 |
148 |
149 |
150 |
151 |
152 | true
153 |
154 |
155 |
156 |
157 | KanbanaApi
158 | true
159 |
160 |
161 |
162 |
163 | true
164 |
165 |
166 |
167 |
168 | true
169 |
170 |
171 |
172 |
173 | true
174 |
175 |
176 |
177 |
178 | true
179 |
180 |
181 |
182 |
183 | KanbanaApi.exe
184 | true
185 |
186 |
187 |
188 |
189 | 1
190 |
191 |
192 | Contents\MacOS
193 | 1
194 |
195 |
196 | 0
197 |
198 |
199 |
200 |
201 | classes
202 | 1
203 |
204 |
205 | classes
206 | 1
207 |
208 |
209 |
210 |
211 | res\xml
212 | 1
213 |
214 |
215 | res\xml
216 | 1
217 |
218 |
219 |
220 |
221 | library\lib\armeabi-v7a
222 | 1
223 |
224 |
225 |
226 |
227 | library\lib\armeabi
228 | 1
229 |
230 |
231 | library\lib\armeabi
232 | 1
233 |
234 |
235 |
236 |
237 | library\lib\armeabi-v7a
238 | 1
239 |
240 |
241 |
242 |
243 | library\lib\mips
244 | 1
245 |
246 |
247 | library\lib\mips
248 | 1
249 |
250 |
251 |
252 |
253 | library\lib\armeabi-v7a
254 | 1
255 |
256 |
257 | library\lib\arm64-v8a
258 | 1
259 |
260 |
261 |
262 |
263 | library\lib\armeabi-v7a
264 | 1
265 |
266 |
267 |
268 |
269 | res\drawable
270 | 1
271 |
272 |
273 | res\drawable
274 | 1
275 |
276 |
277 |
278 |
279 | res\values
280 | 1
281 |
282 |
283 | res\values
284 | 1
285 |
286 |
287 |
288 |
289 | res\values-v21
290 | 1
291 |
292 |
293 | res\values-v21
294 | 1
295 |
296 |
297 |
298 |
299 | res\values
300 | 1
301 |
302 |
303 | res\values
304 | 1
305 |
306 |
307 |
308 |
309 | res\drawable
310 | 1
311 |
312 |
313 | res\drawable
314 | 1
315 |
316 |
317 |
318 |
319 | res\drawable-xxhdpi
320 | 1
321 |
322 |
323 | res\drawable-xxhdpi
324 | 1
325 |
326 |
327 |
328 |
329 | res\drawable-ldpi
330 | 1
331 |
332 |
333 | res\drawable-ldpi
334 | 1
335 |
336 |
337 |
338 |
339 | res\drawable-mdpi
340 | 1
341 |
342 |
343 | res\drawable-mdpi
344 | 1
345 |
346 |
347 |
348 |
349 | res\drawable-hdpi
350 | 1
351 |
352 |
353 | res\drawable-hdpi
354 | 1
355 |
356 |
357 |
358 |
359 | res\drawable-xhdpi
360 | 1
361 |
362 |
363 | res\drawable-xhdpi
364 | 1
365 |
366 |
367 |
368 |
369 | res\drawable-mdpi
370 | 1
371 |
372 |
373 | res\drawable-mdpi
374 | 1
375 |
376 |
377 |
378 |
379 | res\drawable-hdpi
380 | 1
381 |
382 |
383 | res\drawable-hdpi
384 | 1
385 |
386 |
387 |
388 |
389 | res\drawable-xhdpi
390 | 1
391 |
392 |
393 | res\drawable-xhdpi
394 | 1
395 |
396 |
397 |
398 |
399 | res\drawable-xxhdpi
400 | 1
401 |
402 |
403 | res\drawable-xxhdpi
404 | 1
405 |
406 |
407 |
408 |
409 | res\drawable-xxxhdpi
410 | 1
411 |
412 |
413 | res\drawable-xxxhdpi
414 | 1
415 |
416 |
417 |
418 |
419 | res\drawable-small
420 | 1
421 |
422 |
423 | res\drawable-small
424 | 1
425 |
426 |
427 |
428 |
429 | res\drawable-normal
430 | 1
431 |
432 |
433 | res\drawable-normal
434 | 1
435 |
436 |
437 |
438 |
439 | res\drawable-large
440 | 1
441 |
442 |
443 | res\drawable-large
444 | 1
445 |
446 |
447 |
448 |
449 | res\drawable-xlarge
450 | 1
451 |
452 |
453 | res\drawable-xlarge
454 | 1
455 |
456 |
457 |
458 |
459 | res\values
460 | 1
461 |
462 |
463 | res\values
464 | 1
465 |
466 |
467 |
468 |
469 | 1
470 |
471 |
472 | Contents\MacOS
473 | 1
474 |
475 |
476 | 0
477 |
478 |
479 |
480 |
481 | Contents\MacOS
482 | 1
483 | .framework
484 |
485 |
486 | Contents\MacOS
487 | 1
488 | .framework
489 |
490 |
491 | 0
492 |
493 |
494 |
495 |
496 | 1
497 | .dylib
498 |
499 |
500 | 1
501 | .dylib
502 |
503 |
504 | 1
505 | .dylib
506 |
507 |
508 | Contents\MacOS
509 | 1
510 | .dylib
511 |
512 |
513 | Contents\MacOS
514 | 1
515 | .dylib
516 |
517 |
518 | 0
519 | .dll;.bpl
520 |
521 |
522 |
523 |
524 | 1
525 | .dylib
526 |
527 |
528 | 1
529 | .dylib
530 |
531 |
532 | 1
533 | .dylib
534 |
535 |
536 | Contents\MacOS
537 | 1
538 | .dylib
539 |
540 |
541 | Contents\MacOS
542 | 1
543 | .dylib
544 |
545 |
546 | 0
547 | .bpl
548 |
549 |
550 |
551 |
552 | 0
553 |
554 |
555 | 0
556 |
557 |
558 | 0
559 |
560 |
561 | 0
562 |
563 |
564 | 0
565 |
566 |
567 | Contents\Resources\StartUp\
568 | 0
569 |
570 |
571 | Contents\Resources\StartUp\
572 | 0
573 |
574 |
575 | 0
576 |
577 |
578 |
579 |
580 | 1
581 |
582 |
583 | 1
584 |
585 |
586 | 1
587 |
588 |
589 |
590 |
591 | 1
592 |
593 |
594 | 1
595 |
596 |
597 | 1
598 |
599 |
600 |
601 |
602 | 1
603 |
604 |
605 | 1
606 |
607 |
608 | 1
609 |
610 |
611 |
612 |
613 | 1
614 |
615 |
616 | 1
617 |
618 |
619 | 1
620 |
621 |
622 |
623 |
624 | 1
625 |
626 |
627 | 1
628 |
629 |
630 | 1
631 |
632 |
633 |
634 |
635 | 1
636 |
637 |
638 | 1
639 |
640 |
641 | 1
642 |
643 |
644 |
645 |
646 | 1
647 |
648 |
649 | 1
650 |
651 |
652 | 1
653 |
654 |
655 |
656 |
657 | 1
658 |
659 |
660 | 1
661 |
662 |
663 | 1
664 |
665 |
666 |
667 |
668 | 1
669 |
670 |
671 | 1
672 |
673 |
674 | 1
675 |
676 |
677 |
678 |
679 | 1
680 |
681 |
682 | 1
683 |
684 |
685 | 1
686 |
687 |
688 |
689 |
690 | 1
691 |
692 |
693 | 1
694 |
695 |
696 | 1
697 |
698 |
699 |
700 |
701 | 1
702 |
703 |
704 | 1
705 |
706 |
707 | 1
708 |
709 |
710 |
711 |
712 | 1
713 |
714 |
715 | 1
716 |
717 |
718 | 1
719 |
720 |
721 |
722 |
723 | 1
724 |
725 |
726 | 1
727 |
728 |
729 | 1
730 |
731 |
732 |
733 |
734 | 1
735 |
736 |
737 | 1
738 |
739 |
740 | 1
741 |
742 |
743 |
744 |
745 | 1
746 |
747 |
748 | 1
749 |
750 |
751 | 1
752 |
753 |
754 |
755 |
756 | 1
757 |
758 |
759 | 1
760 |
761 |
762 | 1
763 |
764 |
765 |
766 |
767 | 1
768 |
769 |
770 | 1
771 |
772 |
773 | 1
774 |
775 |
776 |
777 |
778 | 1
779 |
780 |
781 | 1
782 |
783 |
784 | 1
785 |
786 |
787 |
788 |
789 | 1
790 |
791 |
792 | 1
793 |
794 |
795 | 1
796 |
797 |
798 |
799 |
800 | 1
801 |
802 |
803 | 1
804 |
805 |
806 | 1
807 |
808 |
809 |
810 |
811 | 1
812 |
813 |
814 | 1
815 |
816 |
817 | 1
818 |
819 |
820 |
821 |
822 | 1
823 |
824 |
825 | 1
826 |
827 |
828 | 1
829 |
830 |
831 |
832 |
833 | 1
834 |
835 |
836 | 1
837 |
838 |
839 | 1
840 |
841 |
842 |
843 |
844 | 1
845 |
846 |
847 | 1
848 |
849 |
850 | 1
851 |
852 |
853 |
854 |
855 | 1
856 |
857 |
858 | 1
859 |
860 |
861 | 1
862 |
863 |
864 |
865 |
866 | 1
867 |
868 |
869 | 1
870 |
871 |
872 | 1
873 |
874 |
875 |
876 |
877 | 1
878 |
879 |
880 | 1
881 |
882 |
883 | 1
884 |
885 |
886 |
887 |
888 | 1
889 |
890 |
891 | 1
892 |
893 |
894 |
895 |
896 | ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF
897 | 1
898 |
899 |
900 | ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF
901 | 1
902 |
903 |
904 |
905 |
906 | 1
907 |
908 |
909 | 1
910 |
911 |
912 |
913 |
914 | ..\
915 | 1
916 |
917 |
918 | ..\
919 | 1
920 |
921 |
922 |
923 |
924 | 1
925 |
926 |
927 | 1
928 |
929 |
930 | 1
931 |
932 |
933 |
934 |
935 | 1
936 |
937 |
938 | 1
939 |
940 |
941 | 1
942 |
943 |
944 |
945 |
946 | ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF
947 | 1
948 |
949 |
950 |
951 |
952 | ..\
953 | 1
954 |
955 |
956 | ..\
957 | 1
958 |
959 |
960 |
961 |
962 | Contents
963 | 1
964 |
965 |
966 | Contents
967 | 1
968 |
969 |
970 |
971 |
972 | Contents\Resources
973 | 1
974 |
975 |
976 | Contents\Resources
977 | 1
978 |
979 |
980 |
981 |
982 | library\lib\armeabi-v7a
983 | 1
984 |
985 |
986 | library\lib\arm64-v8a
987 | 1
988 |
989 |
990 | 1
991 |
992 |
993 | 1
994 |
995 |
996 | 1
997 |
998 |
999 | 1
1000 |
1001 |
1002 | Contents\MacOS
1003 | 1
1004 |
1005 |
1006 | Contents\MacOS
1007 | 1
1008 |
1009 |
1010 | 0
1011 |
1012 |
1013 |
1014 |
1015 | library\lib\armeabi-v7a
1016 | 1
1017 |
1018 |
1019 |
1020 |
1021 | 1
1022 |
1023 |
1024 | 1
1025 |
1026 |
1027 |
1028 |
1029 | Assets
1030 | 1
1031 |
1032 |
1033 | Assets
1034 | 1
1035 |
1036 |
1037 |
1038 |
1039 | Assets
1040 | 1
1041 |
1042 |
1043 | Assets
1044 | 1
1045 |
1046 |
1047 |
1048 |
1049 |
1050 |
1051 |
1052 |
1053 |
1054 |
1055 |
1056 |
1057 |
1058 |
1059 | True
1060 | True
1061 |
1062 |
1063 | 12
1064 |
1065 |
1066 |
1067 |
1068 |
1069 |
--------------------------------------------------------------------------------
/KanbanaApi.res:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HashLoad/kanbana-api/2961b4e8382157c7c629a1c79e95ba0cfcd49a6c/KanbanaApi.res
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2019 HashLoad
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # kanbana-api
2 |
3 | ###### Dependencies:
4 |
5 | * [**Horse**](https://github.com/hashload/horse)
6 | * [**Basic Auth**](https://github.com/hashload/horse-basic-auth)
7 | * [**JWT**](https://github.com/hashload/horse-jwt)
8 | * [**Jhonson**](https://github.com/hashload/jhonson)
9 | * [**Ragna**](https://github.com/hashload/ragna)
10 |
11 | ###### To run project:
12 |
13 | * Open an terminal
14 | * Type `boss install` to install all dependencies
15 | * Set the environment variables:
16 | * `ENCRYPT_SECRET`
17 | * `LOGIN_SECRET`
18 | * `LOGIN_EXPIRE`
19 | * `DB_HOST`
20 | * `DB_PORT`
21 | * `DB_DATABASE`
22 | * `DB_PASSWORD`
23 | * `DB_USER`
24 | * Be happy 😄
25 |
26 | ###### Postman:
27 | Import the [file](https://github.com/HashLoad/kanbana-api/blob/master/kanbana-api.postman_collection.json) into [Postman](https://www.postman.com/) to test the API.
28 |
--------------------------------------------------------------------------------
/Src/Migrations/21052019202900_create_table_boards.sql:
--------------------------------------------------------------------------------
1 | -- +goose Up
2 | CREATE TABLE public.boards
3 | (
4 | id bigserial NOT NULL,
5 | name character varying(255) NOT NULL,
6 | CONSTRAINT boards_pkey PRIMARY KEY (id)
7 | );
8 |
--------------------------------------------------------------------------------
/Src/Migrations/21052019203000_create_table_sections.sql:
--------------------------------------------------------------------------------
1 | -- +goose Up
2 | CREATE TABLE public.sections
3 | (
4 | id bigserial NOT NULL,
5 | name character varying(255) NOT NULL,
6 | board_id bigint NOT NULL,
7 | CONSTRAINT sections_pkey PRIMARY KEY (id),
8 | CONSTRAINT sections_board_id_fkey FOREIGN KEY (board_id)
9 | REFERENCES public.boards (id) MATCH SIMPLE
10 | ON UPDATE CASCADE
11 | ON DELETE CASCADE
12 | );
13 |
--------------------------------------------------------------------------------
/Src/Migrations/21052019203100_create_table_tasks.sql:
--------------------------------------------------------------------------------
1 | -- +goose Up
2 | CREATE TABLE public.tasks
3 | (
4 | id bigserial NOT NULL,
5 | name character varying(255) NOT NULL,
6 | section_id bigint NOT NULL,
7 | CONSTRAINT tasks_pkey PRIMARY KEY (id),
8 | CONSTRAINT tasks_section_id_fkey FOREIGN KEY (section_id)
9 | REFERENCES public.sections (id) MATCH SIMPLE
10 | ON UPDATE CASCADE
11 | ON DELETE CASCADE
12 | );
13 |
--------------------------------------------------------------------------------
/Src/Migrations/23072019011200_create_table_users.sql:
--------------------------------------------------------------------------------
1 | -- +goose Up
2 | CREATE TABLE public.users
3 | (
4 | id bigserial NOT NULL,
5 | username character varying(64) NOT NULL,
6 | password character varying(64) NOT NULL,
7 | name character varying(64) NOT NULL,
8 | CONSTRAINT users_pkey PRIMARY KEY (id),
9 | CONSTRAINT users_username_key UNIQUE (username)
10 | );
--------------------------------------------------------------------------------
/Src/configs/Kanbana.Configs.Encrypt.pas:
--------------------------------------------------------------------------------
1 | unit Kanbana.Configs.Encrypt;
2 |
3 | interface
4 |
5 | type
6 | TConfigEncrypt = record
7 | private
8 | function GetSecret: string;
9 | public
10 | property Secret: string read GetSecret;
11 | end;
12 |
13 | implementation
14 |
15 | uses System.SysUtils;
16 |
17 | function TConfigEncrypt.GetSecret: string;
18 | begin
19 | Result := GetEnvironmentVariable('ENCRYPT_SECRET');
20 | end;
21 |
22 | end.
23 |
--------------------------------------------------------------------------------
/Src/configs/Kanbana.Configs.Login.pas:
--------------------------------------------------------------------------------
1 | unit Kanbana.Configs.Login;
2 |
3 | interface
4 |
5 | type
6 | TConfigLogin = record
7 | private
8 | function GetExpires: Integer;
9 | function GetSecret: string;
10 | public
11 | property Expires: Integer read GetExpires;
12 | property Secret: string read GetSecret;
13 | end;
14 |
15 | implementation
16 |
17 | uses System.SysUtils;
18 |
19 | function TConfigLogin.GetExpires: Integer;
20 | begin
21 | Result := GetEnvironmentVariable('LOGIN_EXPIRE').ToInteger;
22 | end;
23 |
24 | function TConfigLogin.GetSecret: string;
25 | begin
26 | Result := GetEnvironmentVariable('LOGIN_SECRET');
27 | end;
28 |
29 | end.
30 |
--------------------------------------------------------------------------------
/Src/controllers/Kanbana.Controllers.Boards.pas:
--------------------------------------------------------------------------------
1 | unit Kanbana.Controllers.Boards;
2 |
3 | interface
4 |
5 | procedure Registry;
6 |
7 | implementation
8 |
9 | uses Horse, Kanbana.Providers.Authorization, System.JSON, Ragna, Kanbana.Services.Boards, Kanbana.Configs.Login;
10 |
11 | procedure DoPostBoard(Req: THorseRequest; Res: THorseResponse; Next: TProc);
12 | var
13 | Boards: TServiceBoards;
14 | begin
15 | Boards := TServiceBoards.Create;
16 | try
17 | Res.Send(Boards.Post(Req.Body).ToJSONObject()).Status(THTTPStatus.Created);
18 | finally
19 | Boards.Free;
20 | end;
21 | end;
22 |
23 | procedure DoGetBoards(Req: THorseRequest; Res: THorseResponse; Next: TProc);
24 | var
25 | Boards: TServiceBoards;
26 | begin
27 | Boards := TServiceBoards.Create;
28 | try
29 | Res.Send(Boards.Get.ToJSONArray());
30 | finally
31 | Boards.Free;
32 | end;
33 | end;
34 |
35 | procedure Registry;
36 | begin
37 | THorse.AddCallback(Authorization()).Post('/boards', DoPostBoard);
38 | THorse.AddCallback(Authorization()).Get('/boards', DoGetBoards);
39 | end;
40 |
41 | end.
42 |
--------------------------------------------------------------------------------
/Src/controllers/Kanbana.Controllers.Login.pas:
--------------------------------------------------------------------------------
1 | unit Kanbana.Controllers.Login;
2 |
3 | interface
4 |
5 | procedure Registry;
6 |
7 | implementation
8 |
9 | uses Horse, Kanbana.Providers.Authorization, JOSE.Core.JWT, Kanbana.Configs.Login, System.JSON, System.SysUtils, System.DateUtils,
10 | JOSE.Core.Builder;
11 |
12 | procedure DoGetLogin(Req: THorseRequest; Res: THorseResponse; Next: TProc);
13 | var
14 | JWT: TJWT;
15 | Claims: TJWTClaims;
16 | Config: TConfigLogin;
17 | begin
18 | JWT := TJWT.Create;
19 | Claims := JWT.Claims;
20 | Claims.JSON := TJSONObject.Create;
21 | Claims.IssuedAt := Now;
22 | Claims.Expiration := IncHour(Now, Config.Expires);
23 | Res.Send(TJSONObject.Create.AddPair('token', TJOSE.SHA256CompactToken(Config.Secret, JWT)));
24 | end;
25 |
26 | procedure Registry;
27 | begin
28 | THorse.AddCallback(BasicAuthorization()).Get('/login', DoGetLogin);
29 | end;
30 |
31 | end.
32 |
--------------------------------------------------------------------------------
/Src/controllers/Kanbana.Controllers.Sections.pas:
--------------------------------------------------------------------------------
1 | unit Kanbana.Controllers.Sections;
2 |
3 | interface
4 |
5 | procedure Registry;
6 |
7 | implementation
8 |
9 | uses Horse, Kanbana.Providers.Authorization, System.JSON, Ragna, Kanbana.Services.Sections, SysUtils;
10 |
11 | procedure DoPostSection(Req: THorseRequest; Res: THorseResponse; Next: TProc);
12 | var
13 | BoardId: Integer;
14 | Sections: TServiceSections;
15 | begin
16 | Sections := TServiceSections.Create;
17 | try
18 | BoardId := Req.Params['board_id'].ToInteger;
19 | Res.Send(Sections.Post(BoardId, Req.Body).ToJSONObject()).Status(THTTPStatus.Created);
20 | finally
21 | Sections.Free;
22 | end;
23 | end;
24 |
25 | procedure DoGetSections(Req: THorseRequest; Res: THorseResponse; Next: TProc);
26 | var
27 | BoardId: Integer;
28 | Sections: TServiceSections;
29 | begin
30 | Sections := TServiceSections.Create;
31 | try
32 | BoardId := Req.Params['board_id'].ToInteger;
33 | Res.Send(Sections.Get(BoardId).ToJSONArray());
34 | finally
35 | Sections.Free;
36 | end;
37 | end;
38 |
39 | procedure Registry;
40 | begin
41 | THorse.AddCallback(Authorization()).Post('/boards/:board_id/sections', DoPostSection);
42 | THorse.AddCallback(Authorization()).Get('/boards/:board_id/sections', DoGetSections);
43 | end;
44 |
45 | end.
46 |
--------------------------------------------------------------------------------
/Src/controllers/Kanbana.Controllers.Tasks.pas:
--------------------------------------------------------------------------------
1 | unit Kanbana.Controllers.Tasks;
2 |
3 | interface
4 |
5 | procedure Registry;
6 |
7 | implementation
8 |
9 | uses Horse, Kanbana.Providers.Authorization, System.JSON, Ragna, Kanbana.Services.Tasks, SysUtils;
10 |
11 | procedure DoPostTask(Req: THorseRequest; Res: THorseResponse; Next: TProc);
12 | var
13 | Tasks: TServiceTasks;
14 | BoardId, SectionId: Integer;
15 | begin
16 | Tasks := TServiceTasks.Create;
17 | try
18 | BoardId := Req.Params['board_id'].ToInteger;
19 | SectionId := Req.Params['section_id'].ToInteger;
20 | Res.Send(Tasks.Post(BoardId, SectionId, Req.Body).ToJSONObject()).Status(THTTPStatus.Created);
21 | finally
22 | Tasks.Free;
23 | end;
24 | end;
25 |
26 | procedure DoGetTasks(Req: THorseRequest; Res: THorseResponse; Next: TProc);
27 | var
28 | Tasks: TServiceTasks;
29 | BoardId, SectionId: Integer;
30 | begin
31 | Tasks := TServiceTasks.Create;
32 | try
33 | BoardId := Req.Params['board_id'].ToInteger;
34 | SectionId := Req.Params['section_id'].ToInteger;
35 | Res.Send(Tasks.Get(BoardId, SectionId).ToJSONArray());
36 | finally
37 | Tasks.Free;
38 | end;
39 | end;
40 |
41 | procedure Registry;
42 | begin
43 | THorse.AddCallback(Authorization()).Post('/boards/:board_id/sections/:section_id/tasks', DoPostTask);
44 | THorse.AddCallback(Authorization()).Get('/boards/:board_id/sections/:section_id/tasks', DoGetTasks);
45 | end;
46 |
47 | end.
48 |
--------------------------------------------------------------------------------
/Src/controllers/Kanbana.Controllers.Users.pas:
--------------------------------------------------------------------------------
1 | unit Kanbana.Controllers.Users;
2 |
3 | interface
4 |
5 | procedure Registry;
6 |
7 | implementation
8 |
9 | uses Horse, System.JSON, Ragna, Kanbana.Providers.Authorization, Kanbana.Services.Users;
10 |
11 | procedure DoGetUsers(Req: THorseRequest; Res: THorseResponse; Next: TProc);
12 | var
13 | Users: TServiceUsers;
14 | begin
15 | Users := TServiceUsers.Create;
16 | try
17 | Res.Send(Users.Get.ToJSONArray());
18 | finally
19 | Users.Free;
20 | end;
21 | end;
22 |
23 | procedure DoPostUser(Req: THorseRequest; Res: THorseResponse; Next: TProc);
24 | var
25 | Users: TServiceUsers;
26 | begin
27 | Users := TServiceUsers.Create;
28 | try
29 | Res.Send(Users.Post(Req.Body).ToJSONObject()).Status(THTTPStatus.Created);
30 | finally
31 | Users.Free;
32 | end;
33 | end;
34 |
35 | procedure Registry;
36 | begin
37 | THorse.AddCallback(Authorization()).Get('/users', DoGetUsers);
38 | THorse.AddCallback(Authorization()).Post('/users', DoPostUser);
39 | end;
40 |
41 | end.
42 |
--------------------------------------------------------------------------------
/Src/providers/Kanbana.Providers.Authorization.pas:
--------------------------------------------------------------------------------
1 | unit Kanbana.Providers.Authorization;
2 |
3 | interface
4 |
5 | uses Horse, Horse.JWT, Horse.BasicAuthentication;
6 |
7 | function Authorization: THorseCallback;
8 | function BasicAuthorization: THorseCallback;
9 |
10 | implementation
11 |
12 | uses Kanbana.Configs.Login, Kanbana.Services.Users;
13 |
14 | function DoBasicAuthentication(const Username, Password: string): Boolean;
15 | var
16 | Users: TServiceUsers;
17 | begin
18 | Users := TServiceUsers.Create;
19 | try
20 | Result := Users.IsValid(Username, Password);
21 | finally
22 | Users.Free;
23 | end;
24 | end;
25 |
26 | function BasicAuthorization: THorseCallback;
27 | begin
28 | Result := HorseBasicAuthentication(DoBasicAuthentication);
29 | end;
30 |
31 | function Authorization: THorseCallback;
32 | var
33 | Config: TConfigLogin;
34 | begin
35 | Result := HorseJWT(Config.Secret);
36 | end;
37 |
38 | end.
39 |
--------------------------------------------------------------------------------
/Src/providers/Kanbana.Providers.Connection.dfm:
--------------------------------------------------------------------------------
1 | object ProviderConnection: TProviderConnection
2 | OldCreateOrder = False
3 | Height = 150
4 | Width = 215
5 | object FDConnection: TFDConnection
6 | Params.Strings = (
7 | 'Database=kanbana'
8 | 'User_Name=postgres'
9 | 'Password=postgres'
10 | 'DriverID=PG')
11 | ConnectedStoredUsage = [auDesignTime]
12 | LoginPrompt = False
13 | BeforeConnect = FDConnectionBeforeConnect
14 | Left = 88
15 | Top = 56
16 | end
17 | end
18 |
--------------------------------------------------------------------------------
/Src/providers/Kanbana.Providers.Connection.pas:
--------------------------------------------------------------------------------
1 | unit Kanbana.Providers.Connection;
2 |
3 | interface
4 |
5 | uses System.SysUtils, System.Classes, FireDAC.Stan.Intf, FireDAC.Stan.Option, FireDAC.Stan.Error, FireDAC.UI.Intf,
6 | FireDAC.Phys.Intf, FireDAC.Stan.Def, FireDAC.Stan.Pool, FireDAC.Stan.Async, FireDAC.Phys, FireDAC.ConsoleUI.Wait, Data.DB,
7 | FireDAC.Comp.Client, FireDAC.Phys.PG, FireDAC.Phys.PGDef, FireDAC.VCLUI.Wait;
8 |
9 | type
10 | TProviderConnection = class(TDataModule)
11 | FDConnection: TFDConnection;
12 | procedure FDConnectionBeforeConnect(Sender: TObject);
13 | public
14 | constructor Create; reintroduce;
15 | end;
16 |
17 | var
18 | ProviderConnection: TProviderConnection;
19 |
20 | implementation
21 |
22 | {$R *.dfm}
23 |
24 | constructor TProviderConnection.Create;
25 | begin
26 | inherited Create(nil);
27 | end;
28 |
29 | procedure TProviderConnection.FDConnectionBeforeConnect(Sender: TObject);
30 | var
31 | Params: TFDPhysPGConnectionDefParams;
32 | begin
33 | Params := TFDPhysPGConnectionDefParams(FDConnection.Params);
34 | Params.UserName := GetEnvironmentVariable('DB_USER');
35 | Params.Password := GetEnvironmentVariable('DB_PASSWORD');
36 | Params.Database := GetEnvironmentVariable('DB_DATABASE');
37 | Params.Port := GetEnvironmentVariable('DB_PORT').ToInteger;
38 | Params.Server := GetEnvironmentVariable('DB_HOST');
39 | end;
40 |
41 | end.
42 |
--------------------------------------------------------------------------------
/Src/providers/Kanbana.Providers.Encrypt.pas:
--------------------------------------------------------------------------------
1 | unit Kanbana.Providers.Encrypt;
2 |
3 | interface
4 |
5 | uses System.SysUtils, System.Hash;
6 |
7 | type
8 | TProviderEncrypt = class
9 | class function Encrypt(Value: string): string;
10 | end;
11 |
12 | implementation
13 |
14 | uses Kanbana.Configs.Encrypt;
15 |
16 | class function TProviderEncrypt.Encrypt(Value: string): string;
17 | var
18 | Config: TConfigEncrypt;
19 | Encrypted: string;
20 | begin
21 | Encrypted := THashSHA2.GetHashString(Value + '.' + Config.Secret);
22 | Result := Encrypted;
23 | end;
24 |
25 | end.
26 |
--------------------------------------------------------------------------------
/Src/services/Kanbana.Services.Boards.dfm:
--------------------------------------------------------------------------------
1 | inherited ServiceBoards: TServiceBoards
2 | OldCreateOrder = True
3 | Height = 156
4 | Width = 317
5 | object Boards: TFDQuery
6 | Connection = FDConnection
7 | SQL.Strings = (
8 | 'select '
9 | ' boards.id,'
10 | ' boards.name'
11 | 'from boards')
12 | Left = 208
13 | Top = 56
14 | object BoardsId: TLargeintField
15 | AutoGenerateValue = arAutoInc
16 | FieldName = 'id'
17 | Origin = 'id'
18 | ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
19 | end
20 | object BoardsName: TWideStringField
21 | FieldName = 'name'
22 | Origin = 'name'
23 | Size = 255
24 | end
25 | end
26 | end
27 |
--------------------------------------------------------------------------------
/Src/services/Kanbana.Services.Boards.pas:
--------------------------------------------------------------------------------
1 | unit Kanbana.Services.Boards;
2 |
3 | interface
4 |
5 | uses System.SysUtils, System.Classes, Kanbana.Providers.Connection, FireDAC.Stan.Intf, FireDAC.Stan.Option, FireDAC.Stan.Error,
6 | FireDAC.UI.Intf, FireDAC.Phys.Intf, FireDAC.Stan.Def, FireDAC.Stan.Pool, FireDAC.Stan.Async, FireDAC.Phys, FireDAC.VCLUI.Wait,
7 | FireDAC.ConsoleUI.Wait, Data.DB, FireDAC.Comp.Client, FireDAC.Phys.PG, FireDAC.Phys.PGDef, FireDAC.Stan.Param, FireDAC.DatS,
8 | FireDAC.DApt.Intf, FireDAC.DApt, FireDAC.Comp.DataSet, Ragna, System.JSON;
9 |
10 | type
11 | TServiceBoards = class(TProviderConnection)
12 | Boards: TFDQuery;
13 | BoardsId: TLargeintField;
14 | BoardsName: TWideStringField;
15 | public
16 | function Get: TFDQuery;
17 | function Post(Board: TJSONObject): TFDQuery;
18 | end;
19 |
20 | implementation
21 |
22 | {$R *.dfm}
23 |
24 | function TServiceBoards.Get: TFDQuery;
25 | begin
26 | Result := Boards.OpenUp;
27 | end;
28 |
29 | function TServiceBoards.Post(Board: TJSONObject): TFDQuery;
30 | begin
31 | Result := Boards.New(Board).OpenUp;
32 | end;
33 |
34 | end.
35 |
--------------------------------------------------------------------------------
/Src/services/Kanbana.Services.Sections.dfm:
--------------------------------------------------------------------------------
1 | inherited ServiceSections: TServiceSections
2 | OldCreateOrder = True
3 | Height = 152
4 | Width = 300
5 | object Sections: TFDQuery
6 | Connection = FDConnection
7 | SQL.Strings = (
8 | 'select'
9 | ' sections.id,'
10 | ' sections.name,'
11 | ' sections.board_id'
12 | 'from sections')
13 | Left = 200
14 | Top = 56
15 | object SectionsId: TLargeintField
16 | AutoGenerateValue = arAutoInc
17 | FieldName = 'id'
18 | Origin = 'id'
19 | ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
20 | end
21 | object SectionsName: TWideStringField
22 | FieldName = 'name'
23 | Origin = 'name'
24 | Size = 255
25 | end
26 | object SectionsBoardId: TLargeintField
27 | FieldName = 'board_id'
28 | Origin = 'board_id'
29 | Visible = False
30 | end
31 | end
32 | end
33 |
--------------------------------------------------------------------------------
/Src/services/Kanbana.Services.Sections.pas:
--------------------------------------------------------------------------------
1 | unit Kanbana.Services.Sections;
2 |
3 | interface
4 |
5 | uses System.SysUtils, System.Classes, Kanbana.Providers.Connection, FireDAC.Stan.Intf, FireDAC.Stan.Option, FireDAC.Stan.Error,
6 | FireDAC.UI.Intf, FireDAC.Phys.Intf, FireDAC.Stan.Def, FireDAC.Stan.Pool, FireDAC.Stan.Async, FireDAC.Phys, FireDAC.Phys.PG,
7 | FireDAC.Phys.PGDef, FireDAC.ConsoleUI.Wait, Data.DB, FireDAC.Comp.Client, System.JSON, FireDAC.Stan.Param, FireDAC.DatS,
8 | FireDAC.DApt.Intf, FireDAC.DApt, FireDAC.Comp.DataSet, Ragna, FireDAC.VCLUI.Wait;
9 |
10 | type
11 | TServiceSections = class(TProviderConnection)
12 | Sections: TFDQuery;
13 | SectionsId: TLargeintField;
14 | SectionsName: TWideStringField;
15 | SectionsBoardId: TLargeintField;
16 | public
17 | function Get(BoardId: Integer): TFDQuery;
18 | function Post(BoardId: Integer; Section: TJSONObject): TFDQuery;
19 | end;
20 |
21 | implementation
22 |
23 | {$R *.dfm}
24 |
25 | function TServiceSections.Get(BoardId: Integer): TFDQuery;
26 | begin
27 | Result := Sections.Where(SectionsBoardId).Equals(BoardId).OpenUp;
28 | end;
29 |
30 | function TServiceSections.Post(BoardId: Integer; Section: TJSONObject): TFDQuery;
31 | begin
32 | SectionsBoardId.Visible := True;
33 | Section.RemovePair('boardId').Free;
34 | Section.AddPair('boardId', TJSONNumber.Create(BoardId));
35 | Result := Sections.New(Section).OpenUp;
36 | SectionsBoardId.Visible := False;
37 | end;
38 |
39 | end.
40 |
--------------------------------------------------------------------------------
/Src/services/Kanbana.Services.Tasks.dfm:
--------------------------------------------------------------------------------
1 | inherited ServiceTasks: TServiceTasks
2 | OldCreateOrder = True
3 | Height = 148
4 | Width = 304
5 | object Tasks: TFDQuery
6 | Connection = FDConnection
7 | SQL.Strings = (
8 | 'select'
9 | ' tasks.id,'
10 | ' tasks.name,'
11 | ' tasks.section_id'
12 | 'from tasks')
13 | Left = 200
14 | Top = 56
15 | object TasksId: TLargeintField
16 | AutoGenerateValue = arAutoInc
17 | FieldName = 'id'
18 | Origin = 'id'
19 | ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
20 | end
21 | object TasksName: TWideStringField
22 | FieldName = 'name'
23 | Origin = 'name'
24 | Size = 255
25 | end
26 | object TasksSectionId: TLargeintField
27 | FieldName = 'section_id'
28 | Origin = 'section_id'
29 | Visible = False
30 | end
31 | end
32 | end
33 |
--------------------------------------------------------------------------------
/Src/services/Kanbana.Services.Tasks.pas:
--------------------------------------------------------------------------------
1 | unit Kanbana.Services.Tasks;
2 |
3 | interface
4 |
5 | uses System.SysUtils, System.Classes, Kanbana.Providers.Connection, FireDAC.Stan.Intf, FireDAC.Stan.Option, FireDAC.Stan.Error,
6 | FireDAC.UI.Intf, FireDAC.Phys.Intf, FireDAC.Stan.Def, FireDAC.Stan.Pool, FireDAC.Stan.Async, FireDAC.Phys, FireDAC.Phys.PG,
7 | FireDAC.Phys.PGDef, FireDAC.ConsoleUI.Wait, Data.DB, FireDAC.Comp.Client, System.JSON, FireDAC.Stan.Param, FireDAC.DatS,
8 | FireDAC.DApt.Intf, FireDAC.DApt, FireDAC.Comp.DataSet, Ragna, FireDAC.VCLUI.Wait;
9 |
10 | type
11 | TServiceTasks = class(TProviderConnection)
12 | Tasks: TFDQuery;
13 | TasksId: TLargeintField;
14 | TasksName: TWideStringField;
15 | TasksSectionId: TLargeintField;
16 | public
17 | function Get(BoardId, SectionId: Integer): TFDQuery;
18 | function Post(BoardId, SectionId: Integer; Task: TJSONObject): TFDQuery;
19 | end;
20 |
21 | implementation
22 |
23 | {$R *.dfm}
24 |
25 | function TServiceTasks.Get(BoardId, SectionId: Integer): TFDQuery;
26 | begin
27 | Result := Tasks.Where(TasksSectionId).Equals(SectionId).OpenUp;
28 | end;
29 |
30 | function TServiceTasks.Post(BoardId, SectionId: Integer; Task: TJSONObject): TFDQuery;
31 | begin
32 | TasksSectionId.Visible := True;
33 | Task.RemovePair('sectionId').Free;
34 | Task.AddPair('sectionId', TJSONNumber.Create(SectionId));
35 | Result := Tasks.New(Task).OpenUp;
36 | TasksSectionId.Visible := False;
37 | end;
38 |
39 | end.
40 |
--------------------------------------------------------------------------------
/Src/services/Kanbana.Services.Users.dfm:
--------------------------------------------------------------------------------
1 | inherited ServiceUsers: TServiceUsers
2 | OldCreateOrder = True
3 | Height = 160
4 | Width = 320
5 | object Users: TFDQuery
6 | Connection = FDConnection
7 | SQL.Strings = (
8 | 'select '
9 | ' users.id,'
10 | ' users.name,'
11 | ' users.username,'
12 | ' users.password'
13 | 'from users')
14 | Left = 208
15 | Top = 56
16 | object UsersId: TLargeintField
17 | AutoGenerateValue = arAutoInc
18 | FieldName = 'id'
19 | Origin = 'id'
20 | ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
21 | end
22 | object UsersName: TWideStringField
23 | FieldName = 'name'
24 | Origin = 'name'
25 | Size = 64
26 | end
27 | object UsersUsername: TWideStringField
28 | FieldName = 'username'
29 | Origin = 'username'
30 | Size = 64
31 | end
32 | object UsersPassword: TWideStringField
33 | FieldName = 'password'
34 | Origin = '"password"'
35 | Size = 64
36 | end
37 | end
38 | end
39 |
--------------------------------------------------------------------------------
/Src/services/Kanbana.Services.Users.pas:
--------------------------------------------------------------------------------
1 | unit Kanbana.Services.Users;
2 |
3 | interface
4 |
5 | uses System.SysUtils, System.Classes, FireDAC.Stan.Intf, FireDAC.Stan.Option, FireDAC.Stan.Error, FireDAC.UI.Intf,
6 | FireDAC.Phys.Intf, FireDAC.Stan.Def, FireDAC.Stan.Pool, FireDAC.Stan.Async, FireDAC.Phys, FireDAC.ConsoleUI.Wait, Data.DB,
7 | FireDAC.Comp.Client, FireDAC.Phys.PG, FireDAC.Phys.PGDef, FireDAC.Stan.Param, FireDAC.DatS, FireDAC.DApt.Intf, FireDAC.DApt,
8 | FireDAC.Comp.DataSet, Ragna, System.Hash, System.JSON, Kanbana.Providers.Connection, FireDAC.VCLUI.Wait;
9 |
10 | type
11 | TServiceUsers = class(TProviderConnection)
12 | Users: TFDQuery;
13 | UsersId: TLargeintField;
14 | UsersName: TWideStringField;
15 | UsersUsername: TWideStringField;
16 | UsersPassword: TWideStringField;
17 | public
18 | function IsValid(Username, Password: string): Boolean;
19 | function Post(User: TJSONObject): TFDQuery;
20 | function Get: TFDQuery;
21 | end;
22 |
23 | implementation
24 |
25 | uses Kanbana.Providers.Encrypt;
26 |
27 | {$R *.dfm}
28 |
29 | function TServiceUsers.Get: TFDQuery;
30 | begin
31 | UsersPassword.Visible := False;
32 | Result := Users.OpenUp;
33 | end;
34 |
35 | function TServiceUsers.IsValid(Username, Password: string): Boolean;
36 | begin
37 | Result := not Users.Where(UsersUsername).Equals(Username).&And(UsersPassword).Equals(TProviderEncrypt.Encrypt(Password))
38 | .OpenUp.IsEmpty;
39 | end;
40 |
41 | function TServiceUsers.Post(User: TJSONObject): TFDQuery;
42 | var
43 | Password: string;
44 | begin
45 | Password := TProviderEncrypt.Encrypt(User.GetValue('password'));
46 | User.RemovePair('password').Free;
47 | User.AddPair('password', Password);
48 | Users.New(User).OpenUp;
49 | UsersPassword.Visible := False;
50 | Result := Users;
51 | end;
52 |
53 | end.
54 |
--------------------------------------------------------------------------------
/boss-lock.json:
--------------------------------------------------------------------------------
1 | {
2 | "hash": "754a36f51bdf50f085790c8a7daa6479",
3 | "updated": "2022-05-03T10:50:29.1722725-03:00",
4 | "installedModules": {
5 | "github.com/andre-djsystem/hashlib4pascal": {
6 | "name": "hashlib4pascal",
7 | "version": "1.0.0",
8 | "hash": "8528036224699ab509c7d8f31d691ffb",
9 | "artifacts": {},
10 | "failed": false,
11 | "changed": false
12 | },
13 | "github.com/hashload/horse": {
14 | "name": "horse",
15 | "version": "3.0.1",
16 | "hash": "2b63e2de4ec51f4c67536dfae15b61b7",
17 | "artifacts": {},
18 | "failed": false,
19 | "changed": false
20 | },
21 | "github.com/hashload/horse-basic-auth": {
22 | "name": "horse-basic-auth",
23 | "version": "1.2.1",
24 | "hash": "eb296274eeacbc7530dfca5b8a4a219d",
25 | "artifacts": {},
26 | "failed": false,
27 | "changed": false
28 | },
29 | "github.com/hashload/horse-jwt": {
30 | "name": "horse-jwt",
31 | "version": "2.0.9",
32 | "hash": "75b58ffd6450d77e24d4f0083f2ab88f",
33 | "artifacts": {},
34 | "failed": false,
35 | "changed": false
36 | },
37 | "github.com/hashload/jhonson": {
38 | "name": "jhonson",
39 | "version": "1.1.4",
40 | "hash": "7f48e0509b98505a12fa80ee39b53aea",
41 | "artifacts": {},
42 | "failed": false,
43 | "changed": false
44 | },
45 | "github.com/hashload/ragna": {
46 | "name": "ragna",
47 | "version": "3.2.2",
48 | "hash": "4c0a9de8137c679e607bd626e0a1300c",
49 | "artifacts": {},
50 | "failed": false,
51 | "changed": false
52 | },
53 | "github.com/paolo-rossi/delphi-jose-jwt": {
54 | "name": "delphi-jose-jwt",
55 | "version": "v3.0.3",
56 | "hash": "d8b6ff80aff10e83d87219f45fa43ffb",
57 | "artifacts": {},
58 | "failed": false,
59 | "changed": false
60 | },
61 | "github.com/viniciussanchez/dataset-serialize": {
62 | "name": "dataset-serialize",
63 | "version": "v2.4.0",
64 | "hash": "f47b044fca0d9bb347f856798fb20cad",
65 | "artifacts": {},
66 | "failed": false,
67 | "changed": false
68 | }
69 | }
70 | }
--------------------------------------------------------------------------------
/boss.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "kanbana-api",
3 | "description": "",
4 | "version": "1.0.0",
5 | "homepage": "",
6 | "mainsrc": "src",
7 | "projects": [],
8 | "dependencies": {
9 | "github.com/hashload/horse": "^3.0.1",
10 | "github.com/hashload/horse-basic-auth": "^1.2.1",
11 | "github.com/hashload/horse-jwt": "^2.0.9",
12 | "github.com/hashload/jhonson": "^1.1.4",
13 | "github.com/hashload/ragna": "^3.2.2"
14 | }
15 | }
--------------------------------------------------------------------------------
/docker-compose.yml:
--------------------------------------------------------------------------------
1 | version: '2.1'
2 |
3 | services:
4 | horse:
5 | build: Docker/Horse
6 | environment:
7 | DB_USER: 'postgres'
8 | DB_PASSWORD: 'postgres'
9 | DB_DATABASE: 'kanbana'
10 | DB_PORT: '5432'
11 | DB_HOST: 'postgres'
12 | links:
13 | - postgres
14 | privileged: true
15 | tty: true
16 | ports:
17 | - '9000:9000'
18 | - '64211:64211'
19 |
20 | goose:
21 | build: Docker/Goose
22 | environment:
23 | GOOSE_DRIVER: 'postgres'
24 | GOOSE_DATABASE: 'kanbana'
25 | GOOSE_USER: 'postgres'
26 | GOOSE_HOST: 'postgres'
27 | GOOSE_PASSWORD: 'postgres'
28 | GOOSE_PORT: '5432'
29 | volumes:
30 | - ./Src/Migrations:/migrations
31 | links:
32 | - postgres
33 |
34 | pgadmin:
35 | image: dpage/pgadmin4
36 | environment:
37 | PGADMIN_DEFAULT_EMAIL: 'postgres'
38 | PGADMIN_DEFAULT_PASSWORD: 'postgres'
39 | volumes:
40 | - pgadmin-data:/var/lib/pgadmin
41 | ports:
42 | - '5050:80'
43 | links:
44 | - postgres
45 | logging:
46 | driver: 'none'
47 |
48 | postgres:
49 | image: postgres:10
50 | environment:
51 | POSTGRES_PASSWORD: 'postgres'
52 | POSTGRES_DB: 'kanbana'
53 | PGDATA: '/data/postgres'
54 | volumes:
55 | - pg-data:/data/postgres
56 | ports:
57 | - '5432:5432'
58 |
59 | volumes:
60 | pg-data:
61 | pgadmin-data:
62 |
--------------------------------------------------------------------------------
/kanbana-api.postman_collection.json:
--------------------------------------------------------------------------------
1 | {
2 | "info": {
3 | "_postman_id": "2da07ad3-54e4-42fa-b19e-52af7a0fcd41",
4 | "name": "kanbana-api",
5 | "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
6 | },
7 | "item": [
8 | {
9 | "name": "login",
10 | "item": [
11 | {
12 | "name": "login",
13 | "request": {
14 | "auth": {
15 | "type": "basic",
16 | "basic": [
17 | {
18 | "key": "password",
19 | "value": "123",
20 | "type": "string"
21 | },
22 | {
23 | "key": "username",
24 | "value": "vinicius",
25 | "type": "string"
26 | }
27 | ]
28 | },
29 | "method": "GET",
30 | "header": [],
31 | "url": {
32 | "raw": "http://localhost:9000/login",
33 | "protocol": "http",
34 | "host": [
35 | "localhost"
36 | ],
37 | "port": "9000",
38 | "path": [
39 | "login"
40 | ]
41 | }
42 | },
43 | "response": []
44 | }
45 | ],
46 | "protocolProfileBehavior": {}
47 | },
48 | {
49 | "name": "users",
50 | "item": [
51 | {
52 | "name": "listar",
53 | "request": {
54 | "auth": {
55 | "type": "bearer",
56 | "bearer": [
57 | {
58 | "key": "token",
59 | "value": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE2MDIwMzI4MzgsImV4cCI6MTYwMjAzNjQzOH0.7iOXTSNwUhfg8mwuJjHnYjpWAzwYKdU52SIuFg0cQto",
60 | "type": "string"
61 | }
62 | ]
63 | },
64 | "method": "GET",
65 | "header": [],
66 | "url": {
67 | "raw": "http://localhost:9000/users",
68 | "protocol": "http",
69 | "host": [
70 | "localhost"
71 | ],
72 | "port": "9000",
73 | "path": [
74 | "users"
75 | ]
76 | }
77 | },
78 | "response": []
79 | },
80 | {
81 | "name": "cadastrar",
82 | "request": {
83 | "auth": {
84 | "type": "bearer",
85 | "bearer": [
86 | {
87 | "key": "token",
88 | "value": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE2MDIwMzI4MzgsImV4cCI6MTYwMjAzNjQzOH0.7iOXTSNwUhfg8mwuJjHnYjpWAzwYKdU52SIuFg0cQto",
89 | "type": "string"
90 | }
91 | ]
92 | },
93 | "method": "POST",
94 | "header": [],
95 | "body": {
96 | "mode": "raw",
97 | "raw": "{\r\n \"name\": \"Vinicius Sanchez\",\r\n \"username\": \"vinicius\",\r\n \"password\": \"123\"\r\n}",
98 | "options": {
99 | "raw": {
100 | "language": "json"
101 | }
102 | }
103 | },
104 | "url": {
105 | "raw": "http://localhost:9000/users",
106 | "protocol": "http",
107 | "host": [
108 | "localhost"
109 | ],
110 | "port": "9000",
111 | "path": [
112 | "users"
113 | ]
114 | }
115 | },
116 | "response": []
117 | }
118 | ],
119 | "protocolProfileBehavior": {}
120 | },
121 | {
122 | "name": "boards",
123 | "item": [
124 | {
125 | "name": "listar",
126 | "request": {
127 | "auth": {
128 | "type": "bearer",
129 | "bearer": [
130 | {
131 | "key": "token",
132 | "value": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE2MDIwMzI4MzgsImV4cCI6MTYwMjAzNjQzOH0.7iOXTSNwUhfg8mwuJjHnYjpWAzwYKdU52SIuFg0cQto",
133 | "type": "string"
134 | }
135 | ]
136 | },
137 | "method": "GET",
138 | "header": [],
139 | "url": {
140 | "raw": "http://localhost:9000/boards",
141 | "protocol": "http",
142 | "host": [
143 | "localhost"
144 | ],
145 | "port": "9000",
146 | "path": [
147 | "boards"
148 | ]
149 | }
150 | },
151 | "response": []
152 | },
153 | {
154 | "name": "cadastrar",
155 | "request": {
156 | "auth": {
157 | "type": "bearer",
158 | "bearer": [
159 | {
160 | "key": "token",
161 | "value": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE2MDIwMzI4MzgsImV4cCI6MTYwMjAzNjQzOH0.7iOXTSNwUhfg8mwuJjHnYjpWAzwYKdU52SIuFg0cQto",
162 | "type": "string"
163 | }
164 | ]
165 | },
166 | "method": "POST",
167 | "header": [],
168 | "body": {
169 | "mode": "raw",
170 | "raw": "{\r\n \"name\": \"acbr\"\r\n}",
171 | "options": {
172 | "raw": {
173 | "language": "json"
174 | }
175 | }
176 | },
177 | "url": {
178 | "raw": "http://localhost:9000/boards",
179 | "protocol": "http",
180 | "host": [
181 | "localhost"
182 | ],
183 | "port": "9000",
184 | "path": [
185 | "boards"
186 | ]
187 | }
188 | },
189 | "response": []
190 | }
191 | ],
192 | "protocolProfileBehavior": {}
193 | },
194 | {
195 | "name": "sections",
196 | "item": [
197 | {
198 | "name": "listar",
199 | "request": {
200 | "auth": {
201 | "type": "bearer",
202 | "bearer": [
203 | {
204 | "key": "token",
205 | "value": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE2MDIwMzI4MzgsImV4cCI6MTYwMjAzNjQzOH0.7iOXTSNwUhfg8mwuJjHnYjpWAzwYKdU52SIuFg0cQto",
206 | "type": "string"
207 | }
208 | ]
209 | },
210 | "method": "GET",
211 | "header": [],
212 | "url": {
213 | "raw": "http://localhost:9000/boards/1/sections",
214 | "protocol": "http",
215 | "host": [
216 | "localhost"
217 | ],
218 | "port": "9000",
219 | "path": [
220 | "boards",
221 | "1",
222 | "sections"
223 | ]
224 | }
225 | },
226 | "response": []
227 | },
228 | {
229 | "name": "cadastrar",
230 | "request": {
231 | "auth": {
232 | "type": "bearer",
233 | "bearer": [
234 | {
235 | "key": "token",
236 | "value": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE2MDIwMzI4MzgsImV4cCI6MTYwMjAzNjQzOH0.7iOXTSNwUhfg8mwuJjHnYjpWAzwYKdU52SIuFg0cQto",
237 | "type": "string"
238 | }
239 | ]
240 | },
241 | "method": "POST",
242 | "header": [],
243 | "body": {
244 | "mode": "raw",
245 | "raw": "{\r\n \"name\": \"horse\"\r\n}",
246 | "options": {
247 | "raw": {
248 | "language": "json"
249 | }
250 | }
251 | },
252 | "url": {
253 | "raw": "http://localhost:9000/boards/1/sections",
254 | "protocol": "http",
255 | "host": [
256 | "localhost"
257 | ],
258 | "port": "9000",
259 | "path": [
260 | "boards",
261 | "1",
262 | "sections"
263 | ]
264 | }
265 | },
266 | "response": []
267 | }
268 | ],
269 | "protocolProfileBehavior": {}
270 | },
271 | {
272 | "name": "tasks",
273 | "item": [
274 | {
275 | "name": "listar",
276 | "request": {
277 | "auth": {
278 | "type": "bearer",
279 | "bearer": [
280 | {
281 | "key": "token",
282 | "value": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE2MDIwMzI4MzgsImV4cCI6MTYwMjAzNjQzOH0.7iOXTSNwUhfg8mwuJjHnYjpWAzwYKdU52SIuFg0cQto",
283 | "type": "string"
284 | }
285 | ]
286 | },
287 | "method": "GET",
288 | "header": [],
289 | "url": {
290 | "raw": "http://localhost:9000/boards/1/sections/3/tasks",
291 | "protocol": "http",
292 | "host": [
293 | "localhost"
294 | ],
295 | "port": "9000",
296 | "path": [
297 | "boards",
298 | "1",
299 | "sections",
300 | "3",
301 | "tasks"
302 | ]
303 | }
304 | },
305 | "response": []
306 | },
307 | {
308 | "name": "cadastrar",
309 | "request": {
310 | "auth": {
311 | "type": "bearer",
312 | "bearer": [
313 | {
314 | "key": "token",
315 | "value": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE2MDIwMzI4MzgsImV4cCI6MTYwMjAzNjQzOH0.7iOXTSNwUhfg8mwuJjHnYjpWAzwYKdU52SIuFg0cQto",
316 | "type": "string"
317 | }
318 | ]
319 | },
320 | "method": "POST",
321 | "header": [],
322 | "body": {
323 | "mode": "raw",
324 | "raw": "{\r\n \"name\": \"Criar apresentação\"\r\n}",
325 | "options": {
326 | "raw": {
327 | "language": "json"
328 | }
329 | }
330 | },
331 | "url": {
332 | "raw": "http://localhost:9000/boards/1/sections/3/tasks",
333 | "protocol": "http",
334 | "host": [
335 | "localhost"
336 | ],
337 | "port": "9000",
338 | "path": [
339 | "boards",
340 | "1",
341 | "sections",
342 | "3",
343 | "tasks"
344 | ]
345 | }
346 | },
347 | "response": []
348 | }
349 | ],
350 | "protocolProfileBehavior": {}
351 | }
352 | ],
353 | "protocolProfileBehavior": {}
354 | }
--------------------------------------------------------------------------------