Skip to content

Commit

Permalink
Merge pull request #123 from szymonpoltorak/devel
Browse files Browse the repository at this point in the history
Last Sprint
  • Loading branch information
szymonpoltorak authored May 12, 2024
2 parents 03713c3 + 10c0253 commit b4a1b9e
Show file tree
Hide file tree
Showing 160 changed files with 3,141 additions and 419 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,7 @@ generated

#Files from development builds
.cache/

#Other files

auth-server/keycloak-theme/themes/corn/login/resources/css/styles.css
78 changes: 78 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ application that is built of few components.
Whole application has been made in spirit of clean code and architecture. We are thinking about security and performance
best practices. Project is deeply tested on backend site and uses Github Actions for CI/CD.

## Database diagram

<div align="center">
<img src="screenshots/db.drawio.png" alt="TechStack">
</div>

## How to run

Application uses docker compose technology to run all components. To run application you have to install docker.
Expand Down Expand Up @@ -45,6 +51,10 @@ cd scripts/dev

## Tech stack

<div align="center">
<img src="screenshots/tech_stack.png" alt="TechStack">
</div>

1. Frontend

* Angular 17,
Expand Down Expand Up @@ -74,3 +84,71 @@ cd scripts/dev
* KeyCloak,
* Mapstruct,
* Lombok.

## Screenshots

* Login

<div align="center">
<img src="screenshots/login.png" alt="TechStack">
</div>

* Register

<div align="center">
<img src="screenshots/register.png" alt="TechStack">
</div>

* Projects

<div align="center">
<img src="screenshots/projects_list.png" alt="TechStack">
</div>

* Project settings

<div align="center">
<img src="screenshots/project_settings.png" alt="TechStack">
</div>

* Sprints

<div align="center">
<img src="screenshots/sprints.png" alt="TechStack">
</div>

* Sprints Burndown

<div align="center">
<img src="screenshots/sprint_burndown.png" alt="TechStack">
</div>

* Task

<div align="center">
<img src="screenshots/task.png" alt="TechStack">
</div>

* Task Comments

<div align="center">
<img src="screenshots/task_comments.png" alt="TechStack">
</div>

* Creating new backlog item

<div align="center">
<img src="screenshots/new_item.png" alt="TechStack">
</div>

* Tasks in Boards

<div align="center">
<img src="screenshots/board_no_group.png" alt="TechStack">
</div>

* Tasks grouped by member

<div align="center">
<img src="screenshots/board_group_member.png" alt="TechStack">
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ public final class ExternalConfig {
private static final String KCCFG_CREATE_PLACEHOLDER_USERS = System.getenv("KCCFG_CREATE_PLACEHOLDER_USERS");

public static final String KCCFG_LOGIN_THEME_NAME = System.getenv("KCCFG_LOGIN_THEME_NAME");
public static final String KCCFG_ACCOUNT_THEME_NAME = System.getenv("KCCFG_ACCOUNT_THEME_NAME");

private static final String KC_SERVER_URL = System.getenv("KC_SERVER_URL");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ public CornRealm() {
setClients(List.of(new CornClient()));
setIdentityProviders(ExternalConfig.getIdentityProviders());
setRevokeRefreshToken(true);
setRememberMe(true);
setBruteForceProtected(true);

if(ExternalConfig.shouldCreatePlaceholderUsers()) {
Expand All @@ -25,6 +24,10 @@ public CornRealm() {
if(ExternalConfig.KCCFG_LOGIN_THEME_NAME != null) {
setLoginTheme(ExternalConfig.KCCFG_LOGIN_THEME_NAME);
}

if(ExternalConfig.KCCFG_ACCOUNT_THEME_NAME != null) {
setAccountTheme(ExternalConfig.KCCFG_ACCOUNT_THEME_NAME);
}
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,16 @@

public class PlaceholderUsers {

private static final String MAIL_SUFFIX = "@mail.pl";
private static final String DEFAULT_ROLE = "default-roles-corn";

public static List<UserRepresentation> generate() {
return Stream.of(
new SimpleUser("Jan", "Kowalski", "jan", "123"),
new SimpleUser("Andrzej", "Switch", "andrzej", "123"),
new SimpleUser("John", "Doe", "john", "123"),
new SimpleUser("Jane", "Doe", "jane", "123"),
new SimpleUser("Alice", "Smith", "alice", "123"),
new SimpleUser("Bob", "Johnson", "bob", "123")
new SimpleUser("Jan", "Kowalski", "jan@gmail.com", "123"),
new SimpleUser("Andrzej", "Switch", "andrzej@gmail.com", "123"),
new SimpleUser("John", "Doe", "john@gmail.com", "123"),
new SimpleUser("Jane", "Doe", "jane@gmail.com", "123"),
new SimpleUser("Alice", "Smith", "alice@gmail.com", "123"),
new SimpleUser("Bob", "Johnson", "bob@gmail.com", "123")
).map(SimpleUser::intoUserRepresentation).toList();
}

Expand All @@ -31,7 +30,7 @@ UserRepresentation intoUserRepresentation() {
setUsername(username());
setFirstName(name);
setLastName(surname);
setEmail(username.toLowerCase()+MAIL_SUFFIX);
setEmail(username());
setEmailVerified(true);
setEnabled(true);
setRealmRoles(List.of(DEFAULT_ROLE));
Expand Down
2 changes: 1 addition & 1 deletion auth-server/keycloak-theme/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ testem.log
Thumbs.db

#Generated css
themes/corn/login/resources/css/styles.css
themes/corn/common/resources/css/styles.css
4 changes: 2 additions & 2 deletions auth-server/keycloak-theme/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"name": "corn-theme",
"version": "1.0.0",
"scripts": {
"build:corn:dev": "tailwindcss -i ./styles/styles.css -o ./themes/corn/login/resources/css/styles.css --watch",
"build:corn:prod": "NODE_ENV=production tailwindcss -i ./styles/styles.css -o ./themes/corn/login/resources/css/styles.css --minify",
"build:corn:dev": "tailwindcss -i ./styles/styles.css -o ./themes/corn/common/resources/css/styles.css --watch",
"build:corn:prod": "NODE_ENV=production tailwindcss -i ./styles/styles.css -o ./themes/corn/common/resources/css/styles.css --minify",
"prettify": "prettier --write '**/*.{js,jsx}'"
},
"lint-staged": {
Expand Down
68 changes: 68 additions & 0 deletions auth-server/keycloak-theme/tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,75 @@ module.exports = {
theme: {
extend: {
colors: {
corn: {
primary: {
50: '#ffe599',
100: '#ffde7f',
200: '#ffd866',
300: '#ffd14c',
400: '#ffcb32',
500: '#ffc419',
600: '#b28500',
700: '#cc9800',
800: '#e5ab00',
900: '#ffbe00',
A100: '#ffe599',
A200: '#ffd866',
A400: '#e5ab00',
A700: '#ffbe00',
contrast: {
50: '#000000',
100: '#000000',
200: '#000000',
300: '#000000',
400: '#ffffff',
500: '#ffffff',
600: '#ffffff',
700: '#ffffff',
800: '#ffffff',
900: '#ffffff',
A100: '#000000',
A200: '#000000',
A400: '#000000',
A700: '#000000',
},
},
accent: {
50: '#b9e3c6',
100: '#73c68e',
200: '#5bbd7b',
300: '#44b368',
400: '#2caa55',
500: '#14A142',
600: '#13903b',
700: '#118035',
800: '#0f702e',
900: '#0d6028',
A100: '#8ad0a1',
A200: '#ffd866',
A400: '#e5ab00',
A700: '#ffbe00',
contrast: {
50: '#000000',
100: '#000000',
200: '#000000',
300: '#000000',
400: '#ffffff',
500: '#ffffff',
600: '#ffffff',
700: '#ffffff',
800: '#ffffff',
900: '#ffffff',
A100: '#000000',
A200: '#000000',
A400: '#000000',
A700: '#000000',
},
},
},
yellowishDark: '#282727',
yellowishDark100: '#49423f',
yellowishDark200: '#666157',
},
},
}
Expand Down
107 changes: 107 additions & 0 deletions auth-server/keycloak-theme/themes/corn/account/account.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
<#import "tailwind-template.ftl" as layout>
<#import "common.ftl" as common />

<@layout.mainLayout active='account' bodyClass='user'; section>

<div class="flex justify-between items-center px-6 pb-4 border-b border-gray-300">
<h2 class="text-3xl font-bold">${msg("editAccountHtmlTitle")}</h2>
<div class="text-sm">
<@common.RED_STAR />
<span>${msg("requiredFields")}</span>
</div>
</div>

<div class="pt-4">
<form action="${url.accountUrl}" class="grid gap-2" method="post">

<input type="hidden" id="stateChecker" name="stateChecker" value="${stateChecker}">

<#if !realm.registrationEmailAsUsername>
<div>
<div>
<label for="username">${msg("username")}</label>
<@common.RED_STAR />
<#if messagesPerField.existsError('username')>
<span class="text-red-500">
${kcSanitize(messagesPerField.getFirstError('username'))?no_esc}
</span>
</#if>
</div>

<@common.DARK_INPUT
tabindex="0" type="text"
placeholder="${msg('username')}"
id="username" name="username"
value="${(account.username!'')}"
disabled="${(!(realm.editUsernameAllowed))?string('true', 'false')}"
/>
</div>
</#if>

<div>
<div>
<label for="email">${msg("email")}</label>
<@common.RED_STAR />
<#if messagesPerField.existsError('email')>
<span class="text-red-500">
${kcSanitize(messagesPerField.getFirstError('email'))?no_esc}
</span>
</#if>
</div>
<@common.DARK_INPUT
tabindex="0" type="text"
placeholder="${msg('email')}"
id="email" name="email"
value="${(account.email!'')}"
/>
</div>

<div>
<div>
<label for="firstName">${msg("firstName")}</label>
<@common.RED_STAR />
<#if messagesPerField.existsError('firstName')>
<span class="text-red-500">
${kcSanitize(messagesPerField.getFirstError('firstName'))?no_esc}
</span>
</#if>
</div>
<@common.DARK_INPUT
tabindex="0" type="text"
placeholder="${msg('firstName')}"
id="firstName" name="firstName"
value="${(account.firstName!'')}"
/>
</div>

<div>
<div>
<label for="lastName">${msg("lastName")}</label>
<@common.RED_STAR />
<#if messagesPerField.existsError('lastName')>
<span class="text-red-500">
${kcSanitize(messagesPerField.getFirstError('lastName'))?no_esc}
</span>
</#if>
</div>
<@common.DARK_INPUT
tabindex="0" type="text"
placeholder="${msg('lastName')}"
id="lastName" name="lastName"
value="${(account.lastName!'')}"
/>
</div>

<div class="grid gap-4 pt-2">
<@common.YELLOW_BUTTON tabindex="" type="submit" name="submitAction" id="kc-login" value="Save">
${msg("doSave")}
</@common.YELLOW_BUTTON>
<@common.WHITE_BUTTON tabindex="" type="submit" name="submitAction" id="kc-login" value="Cancel">
${msg("doCancel")}
</@common.WHITE_BUTTON>
</div>

</form>
</div>

</@layout.mainLayout>
Loading

0 comments on commit b4a1b9e

Please sign in to comment.