-
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.
Merge pull request #14 from zucchero-sintattico/feature/ddd
Feature/ddd
- Loading branch information
Showing
12 changed files
with
171 additions
and
9 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,6 +48,7 @@ | |
.idea/kotlinc.xml | ||
.idea/.gitignore | ||
.idea/vcs.xml | ||
.idea/ktfmt.xml | ||
|
||
# CMake | ||
cmake-build-*/ | ||
|
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,86 @@ | ||
|
||
# Glossary | ||
|
||
Domain glossary for discord clone | ||
|
||
## Concepts | ||
|
||
| Term | Definition | | ||
|--------------------|-----------------------------------------------------------| | ||
| System | The application that is | | ||
| User | A person who uses the system and it's registered | | ||
| User Profile | Information about a user | | ||
| Message | A piece of text sent by a user | | ||
| Session | A video chat session between allowed users | | ||
| Friend | A user who is added to another user's friend list | | ||
| Friendship | A pair of users who have added each other as friends | | ||
| Friend Request | A request to add a user as a friend, sent by another user | | ||
| Direct | A chat between two users that are friends | | ||
| Direct Message | A message sent in a direct | | ||
| Direct Session | A session dedicated to a friendship | | ||
| Server | A group of channels and members | | ||
| Server Profile | Information about a server | | ||
| Owner | The user who created a server | | ||
| Member | A user who is joined in a server | | ||
| Channel | A room inside a server | | ||
| Message Channel | A channel used for text chat | | ||
| Channel Message | A message sent in a message channel | | ||
| Multimedia Channel | A channel used for video chat | | ||
| Multimedia Session | A session dedicated to a multimedia channel | | ||
|
||
## Actions | ||
|
||
### Users | ||
|
||
| Term | Definition | | ||
|-----------------------|------------------------------------------------------------------------------------| | ||
| Registering | The action performed by a person to create an account and becoming a user | | ||
| Logging in | The action performed by a user to enter the system and authenticate himself | | ||
| Logging out | The action performed by a user to exit the system | | ||
| Updating user profile | The action performed by a user to change their profile information and preferences | | ||
|
||
### Friendships | ||
|
||
| Term | Definition | | ||
|----------------------------|-----------------------------------------------------------------------------| | ||
| Sending a friend request | The action performed by a user to send a friend request to another user | | ||
| Accepting a friend request | The action performed by a user to accept a friend request from another user | | ||
| Rejecting a friend request | The action performed by a user to reject a friend request from another user | | ||
|
||
### Directs | ||
|
||
| Term | Definition | | ||
|--------------------------|------------------------------------------------------------------| | ||
| Sending a direct message | The action performed by a user to send a message to another user | | ||
| Joining a direct session | The action performed by a user to enter a direct session | | ||
|
||
|
||
### Servers | ||
|
||
| Term | Definition | | ||
|-----------------------|-----------------------------------------------------------------| | ||
| Creating a server | The action performed by a user to create a server | | ||
| Joining a server | The action performed by a user to enter a server | | ||
| Leaving a server | The action performed by a user to exit a server | | ||
| Deleting a server | The action performed by a user to delete a server | | ||
| Kicking a member | The action performed by a user to remove a member from a server | | ||
| Update server profile | The action performed by a user to update server settings | | ||
|
||
### Channels | ||
|
||
| Term | Definition | | ||
|------------------------------|--------------------------------------------------------------| | ||
| Creating a channel | The action performed by a user to create a channel | | ||
| Deleting a channel | The action performed by a user to delete a channel | | ||
| Joining a multimedia session | The action performed by a user to enter a multimedia session | | ||
| Changing channel settings | The action performed by a user to change channel settings | | ||
|
||
### Sessions | ||
|
||
| Term | Definition | | ||
|----------------------------|---------------------------------------------------------------------| | ||
| Leaving a session | The action performed by a user to exit a session | | ||
| Turning on the camera | The action performed by a user to start the camera in a session | | ||
| Turning off the camera | The action performed by a user to stop the camera in a session | | ||
| Turning on the microphone | The action performed by a user to start the microphone in a session | | ||
| Turning off the microphone | The action performed by a user to stop the microphone in a session | |
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 @@ | ||
plugins { | ||
id("kotlin-base") | ||
} |
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,5 @@ | ||
package piperchat.commons | ||
|
||
interface UserId { | ||
val value: String | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,7 @@ | ||
plugins { | ||
id("kotlin-base") | ||
} | ||
|
||
dependencies { | ||
implementation(project(":commons")) | ||
} |
16 changes: 16 additions & 0 deletions
16
servers-service/src/main/kotlin/piperchat/servers/Channel.kt
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,16 @@ | ||
package piperchat.servers | ||
|
||
import java.util.Date | ||
import piperchat.commons.UserId | ||
|
||
interface ChannelId { | ||
val value: String | ||
} | ||
|
||
interface Channel { | ||
val id: ChannelId | ||
val name: String | ||
val description: String | ||
val participants: List<UserId> | ||
val createdAt: Date | ||
} |
18 changes: 18 additions & 0 deletions
18
servers-service/src/main/kotlin/piperchat/servers/Server.kt
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,18 @@ | ||
package piperchat.servers | ||
|
||
import java.util.Date | ||
import piperchat.commons.UserId | ||
|
||
interface ServerId { | ||
val value: String | ||
} | ||
|
||
interface Server { | ||
val id: ServerId | ||
val name: String | ||
val description: String | ||
val owner: UserId | ||
val participants: List<UserId> | ||
val createdAt: Date | ||
val channels: List<Channel> | ||
} |
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,7 @@ | ||
plugins { | ||
id("kotlin-base") | ||
} | ||
|
||
dependencies { | ||
implementation(project(":commons")) | ||
} |
25 changes: 25 additions & 0 deletions
25
users-service/src/main/kotlin/piperchat/users/domain/User.kt
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,25 @@ | ||
package piperchat.users.domain | ||
|
||
import piperchat.commons.UserId | ||
|
||
interface User { | ||
val id: UserId | ||
val username: String | ||
val email: String | ||
val description: String? | ||
val photoUrl: String? | ||
val friends: List<UserId> | ||
} | ||
|
||
interface FriendRequest { | ||
val id: String | ||
val from: User | ||
val to: User | ||
val status: FriendRequestStatus | ||
} | ||
|
||
enum class FriendRequestStatus { | ||
PENDING, | ||
ACCEPTED, | ||
REJECTED | ||
} |