Skip to content

Commit

Permalink
Merge pull request #1 from EpicOfficer/FEATURE/Wordle
Browse files Browse the repository at this point in the history
Feature/wordle V1
  • Loading branch information
EpicOfficer authored Apr 2, 2024
2 parents fb93dde + 9534bda commit aa1a43d
Show file tree
Hide file tree
Showing 77 changed files with 3,927 additions and 94 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build & publish Blink images
name: Build & publish Blink Docker images
on:
push:
branches: [ main ]
Expand All @@ -20,6 +20,9 @@ jobs:
image: ghcr.io/epicofficer/blink3.bot
- dockerfile: ./Blink3.Web/Dockerfile
image: ghcr.io/epicofficer/blink3.web
- dockerfile: ./Blink3.Activity/Dockerfile
image: ghcr.io/epicofficer/blink3.activity

permissions:
contents: read
packages: write
Expand All @@ -45,11 +48,11 @@ jobs:
type=raw,pattern=latest,value=latest
type=sha,prefix=commit_,
- name: Build and push Docker image Drill4Net.Agent.Service
- name: Build and push Docker images
uses: docker/build-push-action@v5
with:
context: .
file: ${{ matrix.dockerfile }}
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
labels: ${{ steps.meta.outputs.labels }}
2 changes: 1 addition & 1 deletion .idea/.idea.Blink3/.idea/indexLayout.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 0 additions & 6 deletions .idea/.idea.Blink3/.idea/jsLibraryMappings.xml

This file was deleted.

12 changes: 12 additions & 0 deletions .run/Blink3.Activity Dev.run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Blink3.Activity Dev" type="js.build_tools.npm">
<package-json value="$PROJECT_DIR$/Blink3.Activity/package.json" />
<command value="run" />
<scripts>
<script value="dev" />
</scripts>
<node-interpreter value="project" />
<envs />
<method v="2" />
</configuration>
</component>
23 changes: 23 additions & 0 deletions .run/Blink3.Activity_Dockerfile.run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Blink3.Activity/Dockerfile" type="docker-deploy" factoryName="dockerfile" server-name="Docker">
<deployment type="dockerfile">
<settings>
<option name="imageTag" value="blink3.activity" />
<option name="containerName" value="blink3.activity" />
<option name="contextFolderPath" value="." />
<option name="portBindings">
<list>
<DockerPortBindingImpl>
<option name="containerPort" value="80" />
<option name="hostIp" value="127.0.0.1" />
<option name="hostPort" value="8380" />
</DockerPortBindingImpl>
</list>
</option>
<option name="sourceFilePath" value="Blink3.Activity/Dockerfile" />
</settings>
</deployment>
<EXTENSION ID="com.jetbrains.rider.docker.debug" isFastModeEnabled="true" isSslEnabled="false" />
<method v="2" />
</configuration>
</component>
2 changes: 1 addition & 1 deletion Blink3.API/Blink3.API.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Blink3.Common\Blink3.Common.csproj"/>
<ProjectReference Include="..\Blink3.Core\Blink3.Core.csproj"/>
<ProjectReference Include="..\Blink3.DataAccess\Blink3.DataAccess.csproj"/>
</ItemGroup>

Expand Down
2 changes: 1 addition & 1 deletion Blink3.API/Controllers/ApiControllerBase.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using System.Net.Mime;
using Blink3.Common.Extensions;
using Blink3.Core.DiscordAuth.Extensions;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Swashbuckle.AspNetCore.Annotations;
Expand Down
4 changes: 2 additions & 2 deletions Blink3.API/Controllers/AuthController.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using AspNet.Security.OAuth.Discord;
using Blink3.Common.Extensions;
using Blink3.Common.Models;
using Blink3.Core.DiscordAuth;
using Blink3.Core.DiscordAuth.Extensions;
using Microsoft.AspNetCore.Authentication;
using Microsoft.AspNetCore.Authentication.Cookies;
using Microsoft.AspNetCore.Mvc;
Expand Down
6 changes: 3 additions & 3 deletions Blink3.API/Controllers/TodoController.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Blink3.DataAccess.Entities;
using Blink3.DataAccess.Interfaces;
using Blink3.DataAccess.Models;
using Blink3.Core.DTOs;
using Blink3.Core.Entities;
using Blink3.Core.Repositories.Interfaces;
using Microsoft.AspNetCore.Mvc;
using Swashbuckle.AspNetCore.Annotations;

Expand Down
2 changes: 1 addition & 1 deletion Blink3.API/Extensions/ServiceCollectionExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using System.Text.Json;
using AspNet.Security.OAuth.Discord;
using Blink3.API.Models;
using Blink3.Common.Configuration;
using Blink3.Core.Configuration;
using Microsoft.AspNetCore.Authentication.Cookies;
using Microsoft.AspNetCore.Authentication.OAuth;
using Serilog;
Expand Down
6 changes: 3 additions & 3 deletions Blink3.API/Program.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using Blink3.API.Extensions;
using Blink3.API.Services;
using Blink3.Common.Caching.Extensions;
using Blink3.Common.Configuration;
using Blink3.Common.Configuration.Extensions;
using Blink3.Core.Caching.Extensions;
using Blink3.Core.Configuration;
using Blink3.Core.Configuration.Extensions;
using Blink3.DataAccess.Extensions;
using Discord.Rest;
using Microsoft.AspNetCore.HttpOverrides;
Expand Down
2 changes: 1 addition & 1 deletion Blink3.API/Services/DiscordStartupService.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using System.Diagnostics.CodeAnalysis;
using Blink3.Common.Configuration;
using Blink3.Core.Configuration;
using Discord;
using Discord.Rest;
using Microsoft.Extensions.Options;
Expand Down
24 changes: 24 additions & 0 deletions Blink3.Activity/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
.git
*Dockerfile*
*docker-compose*
node_modules

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?

# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*
18 changes: 18 additions & 0 deletions Blink3.Activity/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
module.exports = {
root: true,
env: { browser: true, es2020: true },
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:react-hooks/recommended',
],
ignorePatterns: ['dist', '.eslintrc.cjs'],
parser: '@typescript-eslint/parser',
plugins: ['react-refresh'],
rules: {
'react-refresh/only-export-components': [
'warn',
{ allowConstantExport: true },
],
},
}
24 changes: 24 additions & 0 deletions Blink3.Activity/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
14 changes: 14 additions & 0 deletions Blink3.Activity/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM nginx:alpine AS base
EXPOSE 80

FROM node:21-alpine AS build
WORKDIR /app
COPY ["Blink3.Activity/package.json", "."]
RUN npm install
COPY ["Blink3.Activity", "."]
RUN npm run build

FROM base AS final
WORKDIR /usr/share/nginx/html
COPY --from=build /app/dist .
COPY Blink3.Activity/nginx.conf /etc/nginx/nginx.conf
30 changes: 30 additions & 0 deletions Blink3.Activity/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# React + TypeScript + Vite

This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.

Currently, two official plugins are available:

- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh

## Expanding the ESLint configuration

If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:

- Configure the top-level `parserOptions` property like this:

```js
export default {
// other rules...
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
project: ['./tsconfig.json', './tsconfig.node.json'],
tsconfigRootDir: __dirname,
},
}
```

- Replace `plugin:@typescript-eslint/recommended` to `plugin:@typescript-eslint/recommended-type-checked` or `plugin:@typescript-eslint/strict-type-checked`
- Optionally add `plugin:@typescript-eslint/stylistic-type-checked`
- Install [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and add `plugin:react/recommended` & `plugin:react/jsx-runtime` to the `extends` list
13 changes: 13 additions & 0 deletions Blink3.Activity/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite + React + TS</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>
14 changes: 14 additions & 0 deletions Blink3.Activity/nginx.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
events {}

http {
include mime.types;

server {
listen 80;

location / {
root /usr/share/nginx/html;
try_files $uri $uri/ /index.html =404;
}
}
}
Loading

0 comments on commit aa1a43d

Please sign in to comment.