-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Split the core module into: - `core-data`: data types used throughout the application - `core-users`: authentication and user management - `core-domain`: schema and workflow This change will make the build faster by making it more parallel. Closes #303 See merge request opensavvy/formulaide!163
- Loading branch information
Showing
38 changed files
with
172 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Module core-data | ||
|
||
Data structures and other helpers for the other core modules. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
import java.net.URL | ||
|
||
plugins { | ||
kotlin("multiplatform") | ||
} | ||
|
||
kotlin { | ||
jvm { | ||
jvmToolchain(17) | ||
testRuns.named("test") { | ||
executionTask.configure { | ||
useJUnitPlatform() | ||
} | ||
} | ||
} | ||
js(IR) { | ||
browser { | ||
testTask { | ||
useMocha { | ||
timeout = "1 minute" | ||
} | ||
} | ||
} | ||
} | ||
|
||
sourceSets { | ||
val commonMain by getting { | ||
dependencies { | ||
// Nothing here | ||
} | ||
} | ||
|
||
val commonTest by getting { | ||
dependencies { | ||
implementation(projects.testStructure) | ||
} | ||
} | ||
} | ||
} | ||
|
||
tasks.withType<org.jetbrains.dokka.gradle.DokkaTaskPartial>().configureEach { | ||
dokkaSourceSets.configureEach { | ||
includes.from("${project.projectDir}/README.md") | ||
|
||
sourceLink { | ||
localDirectory.set(file("src")) | ||
remoteUrl.set(URL("https://gitlab.com/opensavvy/formulaide/-/blob/main/core/core-data/src")) | ||
remoteLineSuffix.set("#L") | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
package opensavvy.formulaide.core | ||
|
||
// This is a marker for the package declaration |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
package opensavvy.formulaide.core | ||
|
||
// This is a marker for the package declaration |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
import java.net.URL | ||
|
||
plugins { | ||
kotlin("multiplatform") | ||
} | ||
|
||
kotlin { | ||
jvm { | ||
jvmToolchain(17) | ||
testRuns.named("test") { | ||
executionTask.configure { | ||
useJUnitPlatform() | ||
} | ||
} | ||
} | ||
js(IR) { | ||
browser { | ||
testTask { | ||
useMocha { | ||
timeout = "1 minute" | ||
} | ||
} | ||
} | ||
} | ||
|
||
sourceSets { | ||
val commonMain by getting { | ||
dependencies { | ||
api("opensavvy.pedestal:backbone:_") | ||
api("opensavvy.pedestal:state-arrow:_") | ||
api(KotlinX.datetime) | ||
|
||
api(projects.core.coreData) | ||
api(projects.core.coreUsers) | ||
} | ||
} | ||
|
||
val commonTest by getting { | ||
dependencies { | ||
implementation(projects.test) | ||
implementation(projects.fake) | ||
} | ||
} | ||
} | ||
} | ||
|
||
tasks.withType<org.jetbrains.dokka.gradle.DokkaTaskPartial>().configureEach { | ||
dokkaSourceSets.configureEach { | ||
includes.from("${project.projectDir}/README.md") | ||
|
||
sourceLink { | ||
localDirectory.set(file("src")) | ||
remoteUrl.set(URL("https://gitlab.com/opensavvy/formulaide/-/blob/main/core/core-domain/src")) | ||
remoteLineSuffix.set("#L") | ||
} | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -61,39 +61,39 @@ class InputTest : TestExecutor() { | |
val files = FakeFiles(clock) | ||
val bool = Input.Toggle | ||
|
||
bool.parse("true", files).shouldSucceedAnd { | ||
Input.Toggle.parse("true", files).shouldSucceedAnd { | ||
assertEquals(true, it) | ||
} | ||
|
||
bool.parse("false", files).shouldSucceedAnd { | ||
Input.Toggle.parse("false", files).shouldSucceedAnd { | ||
assertEquals(false, it) | ||
} | ||
|
||
bool.parse("other", files) shouldFailWithType Input.Failures.Parsing::class | ||
bool.parse("something", files) shouldFailWithType Input.Failures.Parsing::class | ||
Input.Toggle.parse("other", files) shouldFailWithType Input.Failures.Parsing::class | ||
Input.Toggle.parse("something", files) shouldFailWithType Input.Failures.Parsing::class | ||
} | ||
|
||
test("Email") { | ||
val files = FakeFiles(clock) | ||
val email = Input.Email | ||
|
||
email.parse("[email protected]", files).shouldSucceedAnd { | ||
Input.Email.parse("[email protected]", files).shouldSucceedAnd { | ||
assertEquals(Email("[email protected]"), it) | ||
} | ||
|
||
email.parse("something", files) shouldFailWithType Input.Failures.Parsing::class | ||
Input.Email.parse("something", files) shouldFailWithType Input.Failures.Parsing::class | ||
} | ||
|
||
test("Parse phone number") { | ||
val files = FakeFiles(clock) | ||
val phone = Input.Phone | ||
|
||
phone.parse("+332345678", files).shouldSucceedAnd { | ||
Input.Phone.parse("+332345678", files).shouldSucceedAnd { | ||
assertEquals("+332345678", it) | ||
} | ||
|
||
phone.parse("thing", files) shouldFailWithType Input.Failures.Parsing::class | ||
phone.parse("123456789123456789123456789", files) shouldFailWithType Input.Failures.Parsing::class | ||
Input.Phone.parse("thing", files) shouldFailWithType Input.Failures.Parsing::class | ||
Input.Phone.parse("123456789123456789123456789", files) shouldFailWithType Input.Failures.Parsing::class | ||
} | ||
|
||
test("Int range constructor") { | ||
|
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Module core-users | ||
|
||
Authentication and role management for Formulaide users. | ||
|
||
There are two types of [users][opensavvy.formulaide.core.User] of Formulaide: the end users, called [guests][opensavvy.formulaide.core.User.Role.Guest], and [employees][opensavvy.formulaide.core.User.Role.Employee]. | ||
|
||
Guests can submit data to the available forms. They are always anonymous and unauthenticated, and therefore cannot access any data (even their own). | ||
|
||
Employees can also submit data to forms, as well as accessing internal forms. | ||
Employees are part of [departments][opensavvy.formulaide.core.Department], which represent the different sections of the company or association using Formulaide. | ||
End user submissions are protected to only be visible by employees belonging to specific departments. | ||
|
||
The [administrator][opensavvy.formulaide.core.User.Role.Administrator] is a specific role given to employees who are allowed to manage Formulaide itself. They can create and edit forms, browse through all user data, and delete data permanently to comply with GDPR requests. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters