-
Notifications
You must be signed in to change notification settings - Fork 1
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 #90 from ChrispyPeaches/develop
Releases 0.0.3 - 0.0.5
- Loading branch information
Showing
259 changed files
with
20,165 additions
and
912 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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
## Problem | ||
<!--Add a description and the userstory prompt--> | ||
|
||
## Definition of Done | ||
|
||
## Subtasks | ||
- [x] Subtask 1 | ||
- [x] Subtask 2 | ||
- [x] etc. |
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,11 @@ | ||
Fixes #ISSUE_NUMBER | ||
|
||
## Problem | ||
|
||
### Definition of Done | ||
|
||
## Solution | ||
|
||
## Documentation | ||
|
||
## How was this tested? |
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,42 @@ | ||
name: Build and Push Docker Image | ||
|
||
on: | ||
push: | ||
branches: | ||
- test | ||
|
||
env: | ||
REGISTRY: ghcr.io | ||
IMAGE_NAME: ${{ github.repository }} | ||
|
||
jobs: | ||
build-and-push: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
steps: | ||
- name: Check Out Repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Log in to the Container registry | ||
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1 | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Extract metadata (tags, labels) for Docker | ||
id: meta | ||
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7 | ||
with: | ||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}/focusapi | ||
|
||
- name: Build and push Docker image | ||
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4 | ||
with: | ||
context: . | ||
file: src/FocusAPI/Dockerfile | ||
push: true | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
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 |
---|---|---|
@@ -1,8 +1,12 @@ | ||
# FocusFriends | ||
|
||
### Description | ||
Focus Friends is a mobile app that uses a timer to track and record user focus sessions. Users can procure in-app currency from completing focus sessions, and can use this currency to buy items to decorate their digital island. Additionally, users can add friends within the app, and can view their islands as well as compete on daily and weekly focus point leaderboards. | ||
|
||
### Useful Links | ||
[Github Project Task Board](https://github.com/users/ChrispyPeaches/projects/1) | ||
|
||
[Sprint planning spreadsheet](https://docs.google.com/spreadsheets/d/1yJxfEH3qCUB0c4kXND5IroIexPQezzHdEeYYtUN7NIc/edit?usp=sharing) | ||
[Sprint planning spreadsheet](https://docs.google.com/spreadsheets/d/17KuePYD55K4Jvs0dNnzJrx7JADw_CWJ8gCb0m-1L0Fg/edit?usp=sharing) | ||
|
||
[Visual Mockup](https://www.figma.com/file/HG8eqMzI47otQWYFIv5iK7/Focus-Timer-App-MockUp?type=design&node-id=0%3A1&mode=design&t=gdzpRvpkRlAWQJPb-1) | ||
|
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,19 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="15.0" Sdk="Microsoft.Docker.Sdk"> | ||
<PropertyGroup Label="Globals"> | ||
<ProjectVersion>2.1</ProjectVersion> | ||
<DockerTargetOS>Linux</DockerTargetOS> | ||
<DockerPublishLocally>False</DockerPublishLocally> | ||
<ProjectGuid>86154e51-9282-4e60-92ef-598eb64d9bd1</ProjectGuid> | ||
<DockerLaunchAction>LaunchBrowser</DockerLaunchAction> | ||
<DockerServiceUrl>{Scheme}://localhost:{ServicePort}/swagger</DockerServiceUrl> | ||
<DockerServiceName>focusapi</DockerServiceName> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<None Include="docker-compose.override.yml"> | ||
<DependentUpon>docker-compose.yml</DependentUpon> | ||
</None> | ||
<None Include="docker-compose.yml" /> | ||
<None Include=".dockerignore" /> | ||
</ItemGroup> | ||
</Project> |
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 @@ | ||
version: '3.4' | ||
|
||
services: | ||
FocusApi: | ||
volumes: | ||
- ${APPDATA}/Microsoft/UserSecrets:/home/app/.microsoft/usersecrets:ro | ||
- ${APPDATA}/ASP.NET/Https:/home/app/.aspnet/https:ro |
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,43 @@ | ||
version: '3.4' | ||
|
||
networks: | ||
FocusApiNetwork: | ||
|
||
services: | ||
FocusApi: | ||
container_name: FocusApiContainer | ||
image: ghcr.io/chrispypeaches/focusfriends/focusapi:test | ||
ports: | ||
- 25565:8080 | ||
- 25566:8081 | ||
build: | ||
context: . | ||
dockerfile: src/FocusAPI/Dockerfile | ||
depends_on: | ||
- FocusApiDb | ||
environment: | ||
ASPNETCORE_URLS: "http://+:8080" | ||
ASPNETCORE_ENVIRONMENT: Test | ||
ASPNETCORE_HTTP_PORTS: 8080 | ||
ASPNETCORE_HTTPS_PORTS: 8081 | ||
env_file: | ||
- stack.env | ||
FocusApiDb: | ||
container_name: focusapidb | ||
hostname: focusapidb | ||
user: root | ||
image: mcr.microsoft.com/mssql/server:2022-latest | ||
ports: | ||
- 8002:1433 | ||
environment: | ||
- ACCEPT_EULA=Y | ||
env_file: | ||
- stack.env | ||
volumes: | ||
- focusapidb_data:/var/opt/mssql:rw | ||
|
||
volumes: | ||
focusapidb_data: | ||
name: focusapidb_data | ||
external: false | ||
|
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,11 @@ | ||
{ | ||
"profiles": { | ||
"Docker Compose": { | ||
"commandName": "DockerCompose", | ||
"commandVersion": "1.0", | ||
"serviceActions": { | ||
"focusapi": "StartDebugging" | ||
} | ||
} | ||
} | ||
} |
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,58 @@ | ||
using Microsoft.AspNetCore.Mvc; | ||
using MediatR; | ||
using FocusCore.Queries.Leaderboard; | ||
using FocusCore.Models; | ||
using FocusCore.Responses.Leaderboard; | ||
|
||
namespace FocusAPI.Controllers | ||
{ | ||
[ApiController] | ||
[Route("[controller]")] | ||
public class LeaderboardController : ControllerBase | ||
{ | ||
private readonly ILogger<UserController> _logger; | ||
private IMediator _mediator; | ||
|
||
public LeaderboardController(ILogger<UserController> logger, IMediator mediator) | ||
{ | ||
_logger = logger; | ||
_mediator = mediator; | ||
} | ||
|
||
[HttpGet] | ||
[Route("Daily")] | ||
[ProducesResponseType(StatusCodes.Status200OK)] | ||
[ProducesResponseType(StatusCodes.Status500InternalServerError)] | ||
public async Task<ActionResult<LeaderboardResponse>> GetDailyLeaderboard([FromQuery] GetDailyLeaderboardQuery query, CancellationToken cancellationToken) | ||
{ | ||
try | ||
{ | ||
LeaderboardResponse result = await _mediator.Send(query, cancellationToken); | ||
return Ok(result); | ||
} | ||
catch (Exception ex) | ||
{ | ||
_logger.Log(LogLevel.Debug, "Error retreiving daily leaderboards. Message: " + ex.Message); | ||
return StatusCode(500); | ||
} | ||
} | ||
|
||
[HttpGet] | ||
[Route("Weekly")] | ||
[ProducesResponseType(StatusCodes.Status200OK)] | ||
[ProducesResponseType(StatusCodes.Status500InternalServerError)] | ||
public async Task<ActionResult<LeaderboardResponse>> GetWeeklyLeaderboard([FromQuery] GetWeeklyLeaderboardQuery query, CancellationToken cancellationToken) | ||
{ | ||
try | ||
{ | ||
LeaderboardResponse result = await _mediator.Send(query, cancellationToken); | ||
return Ok(result); | ||
} | ||
catch (Exception ex) | ||
{ | ||
_logger.Log(LogLevel.Debug, "Error retreiving weekly leaderboards. Message: " + ex.Message); | ||
return StatusCode(500); | ||
} | ||
} | ||
} | ||
} |
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,28 @@ | ||
using Microsoft.AspNetCore.Mvc; | ||
using MediatR; | ||
using FocusAPI.Models; | ||
using FocusCore.Queries.Shop; | ||
using FocusCore.Models; | ||
|
||
namespace FocusAPI.Controllers | ||
{ | ||
[ApiController] | ||
[Route("[controller]")] | ||
public class ShopController : ControllerBase | ||
{ | ||
private readonly ILogger<ShopController> _logger; | ||
private IMediator _mediator; | ||
|
||
public ShopController(ILogger<ShopController> logger, IMediator mediator) | ||
{ | ||
_logger = logger; | ||
_mediator = mediator; | ||
} | ||
|
||
[HttpGet] | ||
public async Task<List<ShopItem>> GetAllShopItems(CancellationToken cancellationToken) | ||
{ | ||
return await _mediator.Send(new GetAllShopItemsQuery()); | ||
} | ||
} | ||
} |
Oops, something went wrong.