-
Notifications
You must be signed in to change notification settings - Fork 3
Architecture
- Frontend
- React for the frontend framework.
- Vite for building.
- npm for package management package management.
- Backend
- ASP.NET as the backend framework.
- NuGet for package management.
- Database libraries:
- Microsoft.EntityFrameworkCore.Design
- Npgsql.EntityFrameworkCore.PostgreSQL
- Microsoft.EntityFrameworkCore
- Microsoft.EntityFrameworkCore.Tools
- Authentication libraries:
- Microsoft.AspNetCore.Authentication.JwtBearer
- Microsoft.AspNetCore.Identity.EntityFrameworkCore
- Microsoft.AspNetCore.Identity
- Microsoft.AspNetCore.SignalR for chatting with websockets.
- PostgreSQL for the database.
- xUnit test for backend unit and end to end testing (after POC).
- ASP.NET as the backend framework.
- The frontend and backend will be deployed to an Azure app service. The Azure app service automatically pulls the latest git commit, builds, and starts the .NET project.
- Deploying the database will be done by Azure Database for PostgreSQL.
All are prefixed with /api
Create a Post.
Request Content:
- game: GameID
- scheduledFor: string (dateandtime ISO 8601)
- description: String
- tags: [list of Tag IDs]
- maxPlayers: Number
Get a Post
Response Body:
- post: ID
- creator: UserID
- game: GameID
- scheduledFor: string (dateandtime ISO 8601)
- description: String
- tags: [list of Tag IDs]
- users: [list of UserID]
- maxPlayers: Number
- chat: ID
Delete a Post
Add a user to a post
Request:
- User: id
Remove a user from a post
Note: Deleting be done (automatically) by the server, not the client.
Create a Tag
Request Content:
- name: string
Response Content:
- id: string
- name: string
Get a tag
Response Content:
- id: string
- name: string
Query for a tag
Params:
- query: string (the beggining of a tag, e.g. mi will match mic) Response Content: Response Body:
- [list of tags]
Create a game
Request Content:
- name: string
Response Content:
- id: string
- name: string
Get a game
Response Content:
- id: string
- name: string
Query for a game
Params:
- query: string (the beggining of a games, e.g. CS will match CS:GO) Response Body:
- [list of games]
Get user info
Response Content:
- username: string
- age: number
- bio: string
- tags: [tags]
- games: [games]
- friends: [users]
- posts: [posts]
- groups: [groups]
Set user info
Requries authentication.
Possible Request Content:
- age: number
- bio: string
- tags: [tags]
- games: [games]
Manage accounts
Authenticate
Request:
- username: string
- password: string
Response:
- token: string
Create an account
Request:
- username: string
- password: string
Response:
- id: string
- username: string
Get user account info
Response:
- id: string
- username: string
Update user account info
Request:
- password: string
Create a Group.
Request Content:
- creator: UserID
- description: String
- tags: [list of Tag IDs]
Get a Group
Response Body:
- group: ID
- creator: UserID
- description: String
- tags: [list of Tag IDs]
- users: [list of UserID]
- chat: ID
Delete a Group
Add a user to a group
Request:
- user: id
Remove a user from a group
Note: Chat creation done when posts, groups, and players are connected, the client shouldn't be the creator. Similarly, Chat deletion is handled by the server.
Post a chat message
Request:
- message: string
Get a chat messages
Params:
- limit: int The maximum number of results to return (for pagination)
- offset: int The index of the first returned result (for pagination)
Response:
- list of messages with:
- createdAt: string (dateAndTime)
- user: ID
- content: string
For searching posts, users, and groups
Params:
- (optional) games: comma seperated string E.g. CS:GO,Dota 2
- (optional) after: string with ISO time
- (optional) requiredPlayers: num
- (optional) tags: comma seperated string
- (optional) text: string
- sort: comma deliniated string with asc/desc E.g. "time:asc,players:desc"
- limit: int The maximum number of results to return (for pagination)
- offset: int The index of the first returned result (for pagination)
Response:
- array of posts
Params:
- (optional) username: string
- (optional) olderThan: num age
- (optional) games: comma seperated string E.g. CS:GO,Dota 2
- (optional) tags: comma seperated string
- (optional) text: string text in bio
- sort: comma deliniated string with asc/desc E.g. "time:asc,players:desc"
- limit: int The maximum number of results to return (for pagination)
- offset: int The index of the first returned result (for pagination)
Response:
- array of users
Params:
- (optional) name: string
- (optional) games: comma seperated string E.g. CS:GO,Dota 2
- (optional) minPlayers: num the minimum amount of players in the group
- (optional) tags: comma seperated string
- (optional) text: string text in bio
- sort: comma deliniated string with asc/desc E.g. "time:asc,players:desc"
- limit: int The maximum number of results to return (for pagination)
- offset: int The index of the first returned result (for pagination)
Response:
- array of groups
TODO
- The website will be a SPA.
- TODO views, pages, and urls.
- TODO need to create profile settings and acc management design to link to URL.
- https://forcesunite.com/register
- https://forcesunite.com/login
- https://forcesunite.com/home
- https://forcesunite.com/discover?q=non-toxic&game=CS-GO&tag=profressional&tag2=dust-2&start_date=2023-09-23&end_date=2023-09-25
- https://forcesunite.com/social
- https://forcesunite.com/discover/post/scrims-at-700-pm-tonight
- https://forcesunite.com/discover/group/ColumbiaGamers
- https://forcesunite.com/profile/FriendlyFred
- https://forcesunite.com/create
- https://forcesunite.com/chat/6
- TODO add parameters
- Navigation-bar: Allows user to navigate sections of the website through the clicking of links.
- Home button: Allows the user to travel to the home page of the website.
- Discover button: Allows the user to travel to the discover page of the website.
- Social button: Allows the user to travel to the discover page of the website.
- Create button: Allows the user to travel to the create page of the website.
- Create Post button: Allows the user to navigate to the create post section of the create page to create a post.
- Create Post button label: Informs the user of the purpose of the button.
- Game (Post Title) Down-Arrow: Allows the user to hide and unhide the Game (Post Title) section.
- Game (Post Title) label: Used to inform the user of the purpose of the Game (Post Title) textbox.
- Game (Post Title) textbox: Used to set the title of the post, which is also the game the user wishes to gather people to play. It can also be used to search pre-existing games.
- Game (Post Title) checkbox: Used to display the selected game to the user, so they can change the chosen game, if necessary.
- Time Down-Arrow: Allows the user to hide and unhide the Time section.
- Time label: Used to inform the user of the purpose of the Time radius buttons and Time entry textboxes.
- Time radius button (Any): Used to display to the user that they wish to play at any unspecified time.
- Time radius button (Between): Allows the user to select options between two specified times that they desire to play a game.
- Time checkbox 1: Used to select the start time that the user wishes to begin playing the game.
- Time 'And' label: Used to assist the user in understanding the start and end times.
- Time checkbox 2: Used to select the end time that the user wishes to finish playing the game.
- Communication Down-Arrow: Allows the user to hide and unhide the Communication section.
- Communication label: Used to inform the user of the purpose of the Communication radius buttons.
- Communication radius button (Any): Allows the user to select the communication type (Any) required to join the user's Post.
- Communication radius button (Mic): Allows the user to select the communication type (Mic) required to join the user's Post.
- Communication radius button (No Mic): Allows the user to select the communication type (No Mic) required to join the user's Post.
- Hashtags Down-Arrow: Allows the user to hide and unhide the Hashtag section.
- Hashtags label: Used to inform the user of the purpose of the hashtag section.
- Hashtags textbox: Allows the user to type in the desired hashtags for their post.
- Hashtags checkboxes: Allows the user to see the previously selected hashtags for their post.
- Hashtags Down-Arrow: Allows the user to hide and unhide the Hashtag section.
- Number of Players Needed Down-Arrow: Allows the user to hide and unhide the Number of Players Needed section.
- Number of Players Needed label: Used to inform the user of the purpose of the Number of Players Needed section.
- Number of Players Needed Radius button (Any): Used to display to the user they wish to play with (Any) number of players.
- Number of Players Needed Radius button (Between): Used to display to the user they wish to play with a number of players (Between) a lowest and highest number of players allowed.
- Number of Players Needed Textbox 1: Used to select the Lowest number of players that the user wishes to begin playing the game.
- Number of Players Needed 'And' label: Used to assist the user in understanding the lowest and highest number of players textboxes.
- Number of Players Needed Textbox 2: Used to select the Highest number of players that the user wishes to begin playing the game.
- Description Down-Arrow: Allows the user to hide and unhide the Description section.
- Description label: Used to inform the user of the purpose of the Description section.
- Description textbox: Allows the user to describe the purpose of the post to other players.
- Create Button label: Informs the user of the purpose of the button.
- Create Button: With the specified choices, allows the user to create a post.
- Clear Button label: Informs the user of the purpose of the button.
- Clear Button: Sets the choices of the create post section back to default values.
TODO