forked from sk1982/actaeon
initial commit
This commit is contained in:
commit
10d3d05781
4
.db-migraterc
Normal file
4
.db-migraterc
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"table": "actaeon_migrations",
|
||||||
|
"sql-file": true
|
||||||
|
}
|
5
.env
Normal file
5
.env
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
NEXT_PUBLIC_ASSET_JACKET_EXTENSION=.webp
|
||||||
|
NEXT_PUBLIC_ASSET_IMAGE_EXTENSION=.webp
|
||||||
|
NEXT_PUBLIC_ASSET_MUSIC_EXTENSION=.opus
|
||||||
|
NEXT_PUBLIC_ASSET_AUDIO_EXTENSION=.opus
|
||||||
|
BASE_PATH=/web
|
1
.env.development
Normal file
1
.env.development
Normal file
@ -0,0 +1 @@
|
|||||||
|
ASSET_URL=/web/assets/
|
2
.env.local.example
Normal file
2
.env.local.example
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
DATABASE_URL=mysql://aime:aime@127.0.0.1:3306/aime
|
||||||
|
NEXTAUTH_SECRET=[insert_random_string_here]
|
1
.env.production
Normal file
1
.env.production
Normal file
@ -0,0 +1 @@
|
|||||||
|
ASSET_URL=/web/assets/
|
3
.eslintrc.json
Normal file
3
.eslintrc.json
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"extends": "next/core-web-vitals"
|
||||||
|
}
|
388
.gitignore
vendored
Normal file
388
.gitignore
vendored
Normal file
@ -0,0 +1,388 @@
|
|||||||
|
.vscode/*
|
||||||
|
!.vscode/settings.json
|
||||||
|
!.vscode/tasks.json
|
||||||
|
!.vscode/launch.json
|
||||||
|
!.vscode/extensions.json
|
||||||
|
!.vscode/*.code-snippets
|
||||||
|
|
||||||
|
# Local History for Visual Studio Code
|
||||||
|
.history/
|
||||||
|
|
||||||
|
# Built Visual Studio Code Extensions
|
||||||
|
*.vsix
|
||||||
|
|
||||||
|
# Logs
|
||||||
|
logs
|
||||||
|
*.log
|
||||||
|
npm-debug.log*
|
||||||
|
yarn-debug.log*
|
||||||
|
yarn-error.log*
|
||||||
|
lerna-debug.log*
|
||||||
|
.pnpm-debug.log*
|
||||||
|
|
||||||
|
# Diagnostic reports (https://nodejs.org/api/report.html)
|
||||||
|
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
|
||||||
|
|
||||||
|
# Runtime data
|
||||||
|
pids
|
||||||
|
*.pid
|
||||||
|
*.seed
|
||||||
|
*.pid.lock
|
||||||
|
|
||||||
|
# Directory for instrumented libs generated by jscoverage/JSCover
|
||||||
|
lib-cov
|
||||||
|
|
||||||
|
# Coverage directory used by tools like istanbul
|
||||||
|
coverage
|
||||||
|
*.lcov
|
||||||
|
|
||||||
|
# nyc test coverage
|
||||||
|
.nyc_output
|
||||||
|
|
||||||
|
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
|
||||||
|
.grunt
|
||||||
|
|
||||||
|
# Bower dependency directory (https://bower.io/)
|
||||||
|
bower_components
|
||||||
|
|
||||||
|
# node-waf configuration
|
||||||
|
.lock-wscript
|
||||||
|
|
||||||
|
# Compiled binary addons (https://nodejs.org/api/addons.html)
|
||||||
|
build/Release
|
||||||
|
|
||||||
|
# Dependency directories
|
||||||
|
node_modules/
|
||||||
|
jspm_packages/
|
||||||
|
|
||||||
|
# Snowpack dependency directory (https://snowpack.dev/)
|
||||||
|
web_modules/
|
||||||
|
|
||||||
|
# TypeScript cache
|
||||||
|
*.tsbuildinfo
|
||||||
|
|
||||||
|
# Optional npm cache directory
|
||||||
|
.npm
|
||||||
|
|
||||||
|
# Optional eslint cache
|
||||||
|
.eslintcache
|
||||||
|
|
||||||
|
# Optional stylelint cache
|
||||||
|
.stylelintcache
|
||||||
|
|
||||||
|
# Microbundle cache
|
||||||
|
.rpt2_cache/
|
||||||
|
.rts2_cache_cjs/
|
||||||
|
.rts2_cache_es/
|
||||||
|
.rts2_cache_umd/
|
||||||
|
|
||||||
|
# Optional REPL history
|
||||||
|
.node_repl_history
|
||||||
|
|
||||||
|
# Output of 'npm pack'
|
||||||
|
*.tgz
|
||||||
|
|
||||||
|
# Yarn Integrity file
|
||||||
|
.yarn-integrity
|
||||||
|
|
||||||
|
# dotenv environment variable files
|
||||||
|
# .env
|
||||||
|
.env.development.local
|
||||||
|
.env.test.local
|
||||||
|
.env.production.local
|
||||||
|
.env.local
|
||||||
|
|
||||||
|
# parcel-bundler cache (https://parceljs.org/)
|
||||||
|
.cache
|
||||||
|
.parcel-cache
|
||||||
|
|
||||||
|
# Next.js build output
|
||||||
|
.next
|
||||||
|
out
|
||||||
|
|
||||||
|
# Nuxt.js build / generate output
|
||||||
|
.nuxt
|
||||||
|
dist
|
||||||
|
|
||||||
|
# Gatsby files
|
||||||
|
.cache/
|
||||||
|
# Comment in the public line in if your project uses Gatsby and not Next.js
|
||||||
|
# https://nextjs.org/blog/next-9-1#public-directory-support
|
||||||
|
# public
|
||||||
|
|
||||||
|
# vuepress build output
|
||||||
|
.vuepress/dist
|
||||||
|
|
||||||
|
# vuepress v2.x temp and cache directory
|
||||||
|
.temp
|
||||||
|
.cache
|
||||||
|
|
||||||
|
# Docusaurus cache and generated files
|
||||||
|
.docusaurus
|
||||||
|
|
||||||
|
# Serverless directories
|
||||||
|
.serverless/
|
||||||
|
|
||||||
|
# FuseBox cache
|
||||||
|
.fusebox/
|
||||||
|
|
||||||
|
# DynamoDB Local files
|
||||||
|
.dynamodb/
|
||||||
|
|
||||||
|
# TernJS port file
|
||||||
|
.tern-port
|
||||||
|
|
||||||
|
# Stores VSCode versions used for testing VSCode extensions
|
||||||
|
.vscode-test
|
||||||
|
|
||||||
|
# yarn v2
|
||||||
|
.yarn/cache
|
||||||
|
.yarn/unplugged
|
||||||
|
.yarn/build-state.yml
|
||||||
|
.yarn/install-state.gz
|
||||||
|
.pnp.*
|
||||||
|
|
||||||
|
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
|
||||||
|
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
|
||||||
|
|
||||||
|
# User-specific stuff
|
||||||
|
.idea/**/workspace.xml
|
||||||
|
.idea/**/tasks.xml
|
||||||
|
.idea/**/usage.statistics.xml
|
||||||
|
.idea/**/dictionaries
|
||||||
|
.idea/**/shelf
|
||||||
|
|
||||||
|
# AWS User-specific
|
||||||
|
.idea/**/aws.xml
|
||||||
|
|
||||||
|
# Generated files
|
||||||
|
.idea/**/contentModel.xml
|
||||||
|
|
||||||
|
# Sensitive or high-churn files
|
||||||
|
.idea/**/dataSources/
|
||||||
|
.idea/**/dataSources.ids
|
||||||
|
.idea/**/dataSources.local.xml
|
||||||
|
.idea/**/sqlDataSources.xml
|
||||||
|
.idea/**/dynamic.xml
|
||||||
|
.idea/**/uiDesigner.xml
|
||||||
|
.idea/**/dbnavigator.xml
|
||||||
|
|
||||||
|
# Gradle
|
||||||
|
.idea/**/gradle.xml
|
||||||
|
.idea/**/libraries
|
||||||
|
|
||||||
|
# Gradle and Maven with auto-import
|
||||||
|
# When using Gradle or Maven with auto-import, you should exclude module files,
|
||||||
|
# since they will be recreated, and may cause churn. Uncomment if using
|
||||||
|
# auto-import.
|
||||||
|
# .idea/artifacts
|
||||||
|
# .idea/compiler.xml
|
||||||
|
# .idea/jarRepositories.xml
|
||||||
|
# .idea/modules.xml
|
||||||
|
# .idea/*.iml
|
||||||
|
# .idea/modules
|
||||||
|
# *.iml
|
||||||
|
# *.ipr
|
||||||
|
|
||||||
|
# CMake
|
||||||
|
cmake-build-*/
|
||||||
|
|
||||||
|
# Mongo Explorer plugin
|
||||||
|
.idea/**/mongoSettings.xml
|
||||||
|
|
||||||
|
# File-based project format
|
||||||
|
*.iws
|
||||||
|
|
||||||
|
# IntelliJ
|
||||||
|
out/
|
||||||
|
|
||||||
|
# mpeltonen/sbt-idea plugin
|
||||||
|
.idea_modules/
|
||||||
|
|
||||||
|
# JIRA plugin
|
||||||
|
atlassian-ide-plugin.xml
|
||||||
|
|
||||||
|
# Cursive Clojure plugin
|
||||||
|
.idea/replstate.xml
|
||||||
|
|
||||||
|
# SonarLint plugin
|
||||||
|
.idea/sonarlint/
|
||||||
|
|
||||||
|
# Crashlytics plugin (for Android Studio and IntelliJ)
|
||||||
|
com_crashlytics_export_strings.xml
|
||||||
|
crashlytics.properties
|
||||||
|
crashlytics-build.properties
|
||||||
|
fabric.properties
|
||||||
|
|
||||||
|
# Editor-based Rest Client
|
||||||
|
.idea/httpRequests
|
||||||
|
|
||||||
|
# Android studio 3.1+ serialized cache file
|
||||||
|
.idea/caches/build_file_checksums.ser
|
||||||
|
|
||||||
|
# Byte-compiled / optimized / DLL files
|
||||||
|
__pycache__/
|
||||||
|
*.py[cod]
|
||||||
|
*$py.class
|
||||||
|
|
||||||
|
# C extensions
|
||||||
|
*.so
|
||||||
|
|
||||||
|
# Distribution / packaging
|
||||||
|
.Python
|
||||||
|
build/
|
||||||
|
develop-eggs/
|
||||||
|
dist/
|
||||||
|
downloads/
|
||||||
|
eggs/
|
||||||
|
.eggs/
|
||||||
|
lib/
|
||||||
|
lib64/
|
||||||
|
parts/
|
||||||
|
sdist/
|
||||||
|
var/
|
||||||
|
wheels/
|
||||||
|
share/python-wheels/
|
||||||
|
*.egg-info/
|
||||||
|
.installed.cfg
|
||||||
|
*.egg
|
||||||
|
MANIFEST
|
||||||
|
|
||||||
|
# PyInstaller
|
||||||
|
# Usually these files are written by a python script from a template
|
||||||
|
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
||||||
|
*.manifest
|
||||||
|
*.spec
|
||||||
|
|
||||||
|
# Installer logs
|
||||||
|
pip-log.txt
|
||||||
|
pip-delete-this-directory.txt
|
||||||
|
|
||||||
|
# Unit test / coverage reports
|
||||||
|
htmlcov/
|
||||||
|
.tox/
|
||||||
|
.nox/
|
||||||
|
.coverage
|
||||||
|
.coverage.*
|
||||||
|
.cache
|
||||||
|
nosetests.xml
|
||||||
|
coverage.xml
|
||||||
|
*.cover
|
||||||
|
*.py,cover
|
||||||
|
.hypothesis/
|
||||||
|
.pytest_cache/
|
||||||
|
cover/
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
*.mo
|
||||||
|
*.pot
|
||||||
|
|
||||||
|
# Django stuff:
|
||||||
|
*.log
|
||||||
|
local_settings.py
|
||||||
|
db.sqlite3
|
||||||
|
db.sqlite3-journal
|
||||||
|
|
||||||
|
# Flask stuff:
|
||||||
|
instance/
|
||||||
|
.webassets-cache
|
||||||
|
|
||||||
|
# Scrapy stuff:
|
||||||
|
.scrapy
|
||||||
|
|
||||||
|
# Sphinx documentation
|
||||||
|
docs/_build/
|
||||||
|
|
||||||
|
# PyBuilder
|
||||||
|
.pybuilder/
|
||||||
|
target/
|
||||||
|
|
||||||
|
# Jupyter Notebook
|
||||||
|
.ipynb_checkpoints
|
||||||
|
|
||||||
|
# IPython
|
||||||
|
profile_default/
|
||||||
|
ipython_config.py
|
||||||
|
|
||||||
|
# pyenv
|
||||||
|
# For a library or package, you might want to ignore these files since the code is
|
||||||
|
# intended to run in multiple environments; otherwise, check them in:
|
||||||
|
# .python-version
|
||||||
|
|
||||||
|
# pipenv
|
||||||
|
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
||||||
|
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
||||||
|
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
||||||
|
# install all needed dependencies.
|
||||||
|
#Pipfile.lock
|
||||||
|
|
||||||
|
# poetry
|
||||||
|
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
||||||
|
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
||||||
|
# commonly ignored for libraries.
|
||||||
|
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
||||||
|
#poetry.lock
|
||||||
|
|
||||||
|
# pdm
|
||||||
|
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
||||||
|
#pdm.lock
|
||||||
|
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
|
||||||
|
# in version control.
|
||||||
|
# https://pdm.fming.dev/#use-with-ide
|
||||||
|
.pdm.toml
|
||||||
|
|
||||||
|
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
||||||
|
__pypackages__/
|
||||||
|
|
||||||
|
# Celery stuff
|
||||||
|
celerybeat-schedule
|
||||||
|
celerybeat.pid
|
||||||
|
|
||||||
|
# SageMath parsed files
|
||||||
|
*.sage.py
|
||||||
|
|
||||||
|
# Environments
|
||||||
|
# .env
|
||||||
|
.venv
|
||||||
|
env/
|
||||||
|
venv/
|
||||||
|
ENV/
|
||||||
|
env.bak/
|
||||||
|
venv.bak/
|
||||||
|
|
||||||
|
# Spyder project settings
|
||||||
|
.spyderproject
|
||||||
|
.spyproject
|
||||||
|
|
||||||
|
# Rope project settings
|
||||||
|
.ropeproject
|
||||||
|
|
||||||
|
# mkdocs documentation
|
||||||
|
/site
|
||||||
|
|
||||||
|
# mypy
|
||||||
|
.mypy_cache/
|
||||||
|
.dmypy.json
|
||||||
|
dmypy.json
|
||||||
|
|
||||||
|
# Pyre type checker
|
||||||
|
.pyre/
|
||||||
|
|
||||||
|
# pytype static type analyzer
|
||||||
|
.pytype/
|
||||||
|
|
||||||
|
# Cython debug symbols
|
||||||
|
cython_debug/
|
||||||
|
|
||||||
|
.idea/dataSources.xml
|
||||||
|
|
||||||
|
# PyCharm
|
||||||
|
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
||||||
|
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
||||||
|
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
||||||
|
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
||||||
|
#.idea/
|
||||||
|
assets/*
|
||||||
|
!assets/fonts
|
||||||
|
public/assets/*
|
||||||
|
!public/assets/fonts
|
8
.idea/.gitignore
vendored
Normal file
8
.idea/.gitignore
vendored
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
# Default ignored files
|
||||||
|
/shelf/
|
||||||
|
/workspace.xml
|
||||||
|
# Editor-based HTTP Client requests
|
||||||
|
/httpRequests/
|
||||||
|
# Datasource local storage ignored files
|
||||||
|
/dataSources/
|
||||||
|
/dataSources.local.xml
|
12
.idea/actaeon.iml
Normal file
12
.idea/actaeon.iml
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<module type="WEB_MODULE" version="4">
|
||||||
|
<component name="NewModuleRootManager">
|
||||||
|
<content url="file://$MODULE_DIR$">
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/.tmp" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/temp" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/tmp" />
|
||||||
|
</content>
|
||||||
|
<orderEntry type="inheritedJdk" />
|
||||||
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
</component>
|
||||||
|
</module>
|
37
.idea/codeStyles/Project.xml
Normal file
37
.idea/codeStyles/Project.xml
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
<component name="ProjectCodeStyleConfiguration">
|
||||||
|
<code_scheme name="Project" version="173">
|
||||||
|
<option name="LINE_SEPARATOR" value=" " />
|
||||||
|
<HTMLCodeStyleSettings>
|
||||||
|
<option name="HTML_ALIGN_ATTRIBUTES" value="false" />
|
||||||
|
</HTMLCodeStyleSettings>
|
||||||
|
<SqlCodeStyleSettings version="6">
|
||||||
|
<option name="DISABLE_FORMATTING" value="true" />
|
||||||
|
<option name="IMP_DECLARE_ALIGN_TYPE" value="false" />
|
||||||
|
<option name="IMP_DECLARE_ALIGN_EQ" value="false" />
|
||||||
|
<option name="EXPR_BINARY_OP_ALIGN" value="false" />
|
||||||
|
</SqlCodeStyleSettings>
|
||||||
|
<TypeScriptCodeStyleSettings version="0">
|
||||||
|
<option name="FORCE_SEMICOLON_STYLE" value="true" />
|
||||||
|
<option name="FILE_NAME_STYLE" value="LISP_CASE" />
|
||||||
|
<option name="USE_DOUBLE_QUOTES" value="false" />
|
||||||
|
<option name="VAR_DECLARATION_WRAP" value="5" />
|
||||||
|
<option name="OBJECT_LITERAL_WRAP" value="1" />
|
||||||
|
<option name="IMPORTS_WRAP" value="0" />
|
||||||
|
<option name="SPACES_WITHIN_OBJECT_LITERAL_BRACES" value="true" />
|
||||||
|
<option name="SPACES_WITHIN_IMPORTS" value="true" />
|
||||||
|
</TypeScriptCodeStyleSettings>
|
||||||
|
<codeStyleSettings language="TypeScript">
|
||||||
|
<option name="ALIGN_MULTILINE_FOR" value="false" />
|
||||||
|
<option name="CALL_PARAMETERS_WRAP" value="1" />
|
||||||
|
<option name="METHOD_CALL_CHAIN_WRAP" value="1" />
|
||||||
|
<option name="ARRAY_INITIALIZER_WRAP" value="1" />
|
||||||
|
<indentOptions>
|
||||||
|
<option name="INDENT_SIZE" value="2" />
|
||||||
|
<option name="CONTINUATION_INDENT_SIZE" value="2" />
|
||||||
|
<option name="TAB_SIZE" value="2" />
|
||||||
|
<option name="USE_TAB_CHARACTER" value="true" />
|
||||||
|
<option name="SMART_TABS" value="true" />
|
||||||
|
</indentOptions>
|
||||||
|
</codeStyleSettings>
|
||||||
|
</code_scheme>
|
||||||
|
</component>
|
5
.idea/codeStyles/codeStyleConfig.xml
Normal file
5
.idea/codeStyles/codeStyleConfig.xml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
<component name="ProjectCodeStyleConfiguration">
|
||||||
|
<state>
|
||||||
|
<option name="USE_PER_PROJECT_SETTINGS" value="true" />
|
||||||
|
</state>
|
||||||
|
</component>
|
8
.idea/modules.xml
Normal file
8
.idea/modules.xml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="ProjectModuleManager">
|
||||||
|
<modules>
|
||||||
|
<module fileurl="file://$PROJECT_DIR$/.idea/actaeon.iml" filepath="$PROJECT_DIR$/.idea/actaeon.iml" />
|
||||||
|
</modules>
|
||||||
|
</component>
|
||||||
|
</project>
|
6
.idea/sqldialects.xml
Normal file
6
.idea/sqldialects.xml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="SqlDialectMappings">
|
||||||
|
<file url="PROJECT" dialect="MariaDB" />
|
||||||
|
</component>
|
||||||
|
</project>
|
6
.idea/vcs.xml
Normal file
6
.idea/vcs.xml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="VcsDirectoryMappings">
|
||||||
|
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||||
|
</component>
|
||||||
|
</project>
|
5
next-env.d.ts
vendored
Normal file
5
next-env.d.ts
vendored
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
/// <reference types="next" />
|
||||||
|
/// <reference types="next/image-types/global" />
|
||||||
|
|
||||||
|
// NOTE: This file should not be edited
|
||||||
|
// see https://nextjs.org/docs/basic-features/typescript for more information.
|
38
next.config.mjs
Normal file
38
next.config.mjs
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
let baseAssetUrl = process.env.ASSET_URL ?? '/';
|
||||||
|
if (!baseAssetUrl.endsWith('/')) baseAssetUrl += '/';
|
||||||
|
|
||||||
|
let basePath = process.env.BASE_PATH ?? '';
|
||||||
|
if (basePath.endsWith('/')) basePath = basePath.slice(0, -1);
|
||||||
|
|
||||||
|
/** @type {import('next').NextConfig} */
|
||||||
|
const nextConfig = {
|
||||||
|
images: {
|
||||||
|
unoptimized: true
|
||||||
|
},
|
||||||
|
basePath,
|
||||||
|
async redirects() {
|
||||||
|
return [...(basePath ? [{
|
||||||
|
source: '/',
|
||||||
|
destination: basePath,
|
||||||
|
permanent: false,
|
||||||
|
basePath: false
|
||||||
|
}] : []), {
|
||||||
|
source: '/',
|
||||||
|
destination: '/dashboard',
|
||||||
|
permanent: false
|
||||||
|
}, {
|
||||||
|
source: '/chuni',
|
||||||
|
destination: '/chuni/dashboard',
|
||||||
|
permanent: false
|
||||||
|
}]
|
||||||
|
},
|
||||||
|
env: {
|
||||||
|
NEXT_PUBLIC_BASE_PATH: basePath,
|
||||||
|
NEXT_PUBLIC_ASSET_URL: baseAssetUrl
|
||||||
|
},
|
||||||
|
sassOptions: {
|
||||||
|
additionalData: `$asset-url: "${baseAssetUrl}";`
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
export default nextConfig;
|
11760
package-lock.json
generated
Normal file
11760
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
55
package.json
Normal file
55
package.json
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
{
|
||||||
|
"name": "actaeon",
|
||||||
|
"version": "0.1.0",
|
||||||
|
"private": true,
|
||||||
|
"license": "0BSD",
|
||||||
|
"scripts": {
|
||||||
|
"dev": "next dev",
|
||||||
|
"build": "next build",
|
||||||
|
"start": "next start",
|
||||||
|
"lint": "next lint",
|
||||||
|
"migrate:up": "dotenvx run -f .env.local -- db-migrate up",
|
||||||
|
"migrate": "npm run migrate:up",
|
||||||
|
"migrate:down": "dotenvx run -f .env.local -- db-migrate down",
|
||||||
|
"migrate:create": "dotenvx run -f .env.local -- db-migrate create",
|
||||||
|
"db:export": "dotenvx run -f .env.local -- kysely-codegen --exclude-pattern cozynet* --exclude-pattern alembic_version --exclude-pattern actaeon_migrations --out-file src/types/db.d.ts && node process-db.js"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@heroicons/react": "^2.1.1",
|
||||||
|
"@nextui-org/react": "^2.2.10",
|
||||||
|
"bcrypt": "^5.1.1",
|
||||||
|
"clsx": "^2.1.0",
|
||||||
|
"db-migrate": "^0.11.14",
|
||||||
|
"db-migrate-mysql": "^2.3.2",
|
||||||
|
"deep-is": "^0.1.4",
|
||||||
|
"framer-motion": "^11.0.8",
|
||||||
|
"jsonwebtoken": "^9.0.2",
|
||||||
|
"kysely": "^0.27.2",
|
||||||
|
"mysql2": "^3.9.2",
|
||||||
|
"next": "14.1.3",
|
||||||
|
"next-auth": "^5.0.0-beta.15",
|
||||||
|
"next-client-cookies": "^1.1.0",
|
||||||
|
"next-themes": "^0.2.1",
|
||||||
|
"react": "^18",
|
||||||
|
"react-dom": "^18",
|
||||||
|
"sass": "^1.71.1",
|
||||||
|
"tailwind-merge": "^2.2.1",
|
||||||
|
"tailwindcss-text-fill-stroke": "^2.0.0-beta.1",
|
||||||
|
"usehooks-ts": "^3.0.1"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@dotenvx/dotenvx": "^0.24.0",
|
||||||
|
"@types/bcrypt": "^5.0.2",
|
||||||
|
"@types/jsonwebtoken": "^9.0.6",
|
||||||
|
"@types/node": "^20",
|
||||||
|
"@types/react": "^18",
|
||||||
|
"@types/react-dom": "^18",
|
||||||
|
"autoprefixer": "^10.0.1",
|
||||||
|
"eslint": "^8",
|
||||||
|
"eslint-config-next": "14.1.3",
|
||||||
|
"kysely-codegen": "^0.13.1",
|
||||||
|
"postcss": "^8",
|
||||||
|
"tailwindcss": "^3.3.0",
|
||||||
|
"typescript": "^5"
|
||||||
|
}
|
||||||
|
}
|
6
postcss.config.js
Normal file
6
postcss.config.js
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
module.exports = {
|
||||||
|
plugins: {
|
||||||
|
tailwindcss: {},
|
||||||
|
autoprefixer: {},
|
||||||
|
},
|
||||||
|
};
|
10
process-db.js
Normal file
10
process-db.js
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
const fs = require('fs');
|
||||||
|
|
||||||
|
const data = fs.readFileSync('./src/types/db.d.ts').toString();
|
||||||
|
const lines = data.split(/\r?\n/g);
|
||||||
|
const removed = ['// Do not edit. File generated by kysely-codegen\n',
|
||||||
|
...lines.slice(lines.findIndex(l => l.includes(' interface ')))
|
||||||
|
.map(l => l.replace(/Generated<(.+?)>/g, '$1'))]
|
||||||
|
.join('\n');
|
||||||
|
|
||||||
|
fs.writeFileSync('./src/types/db.d.ts', removed);
|
99
src/app/globals.scss
Normal file
99
src/app/globals.scss
Normal file
@ -0,0 +1,99 @@
|
|||||||
|
@tailwind base;
|
||||||
|
@tailwind components;
|
||||||
|
@tailwind utilities;
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: Rodin;
|
||||||
|
src: url(#{$asset-url}fonts/rodinl.woff2) format("woff2");
|
||||||
|
font-weight: 300;
|
||||||
|
}
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: Rodin;
|
||||||
|
src: url(#{$asset-url}fonts/rodinm.woff2) format("woff2");
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: Rodin;
|
||||||
|
src: url(#{$asset-url}fonts/rodindb.woff2) format("woff2");
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: Rodin;
|
||||||
|
src: url(#{$asset-url}fonts/rodinb.woff2) format("woff2");
|
||||||
|
font-weight: 700;
|
||||||
|
}
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: Rodin;
|
||||||
|
src: url(#{$asset-url}fonts/rodineb.woff2) format("woff2");
|
||||||
|
font-weight: 800;
|
||||||
|
}
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: Rodin;
|
||||||
|
src: url(#{$asset-url}fonts/rodinub.woff2) format("woff2");
|
||||||
|
font-weight: 900;
|
||||||
|
}
|
||||||
|
|
||||||
|
html {
|
||||||
|
font-family: Rodin, "Helvetica Neue", Helvetica, Arial, ui-sans-serif, system-ui, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
|
||||||
|
}
|
||||||
|
|
||||||
|
.h-fixed {
|
||||||
|
height: calc(100% - 5.5rem);
|
||||||
|
}
|
||||||
|
|
||||||
|
.\@container-size {
|
||||||
|
container-type: size;
|
||||||
|
}
|
||||||
|
|
||||||
|
@layer base {
|
||||||
|
:root {
|
||||||
|
--background: 275 22% 96%;
|
||||||
|
--foreground: 275 5% 10%;
|
||||||
|
--card: 275 22% 96%;
|
||||||
|
--card-foreground: 275 5% 15%;
|
||||||
|
--popover: 275 22% 96%;
|
||||||
|
--popover-foreground: 275 95% 10%;
|
||||||
|
--primary: 275 100% 30%;
|
||||||
|
--primary-foreground: 0 0% 100%;
|
||||||
|
--secondary: 275 22% 90%;
|
||||||
|
--secondary-foreground: 0 0% 0%;
|
||||||
|
--muted: 237 22% 95%;
|
||||||
|
--muted-foreground: 275 5% 40%;
|
||||||
|
--accent: 237 22% 90%;
|
||||||
|
--accent-foreground: 275 5% 15%;
|
||||||
|
--destructive: 0 50% 50%;
|
||||||
|
--destructive-foreground: 275 5% 96%;
|
||||||
|
--border: 275 22% 82%;
|
||||||
|
--input: 275 22% 50%;
|
||||||
|
--ring: 275 100% 30%;
|
||||||
|
--radius: 0.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dark {
|
||||||
|
--background: 275 47% 5%;
|
||||||
|
--foreground: 275 5% 90%;
|
||||||
|
--card: 275 47% 3%;
|
||||||
|
--card-foreground: 275 5% 90%;
|
||||||
|
--popover: 275 47% 5%;
|
||||||
|
--popover-foreground: 275 5% 90%;
|
||||||
|
--primary: 275 100% 30%;
|
||||||
|
--primary-foreground: 0 0% 100%;
|
||||||
|
--secondary: 275 30% 10%;
|
||||||
|
--secondary-foreground: 0 0% 100%;
|
||||||
|
--muted: 237 30% 15%;
|
||||||
|
--muted-foreground: 275 5% 60%;
|
||||||
|
--accent: 237 30% 15%;
|
||||||
|
--accent-foreground: 275 5% 90%;
|
||||||
|
--destructive: 0 50% 30%;
|
||||||
|
--destructive-foreground: 275 5% 90%;
|
||||||
|
--border: 275 30% 18%;
|
||||||
|
--input: 275 30% 18%;
|
||||||
|
--ring: 275 100% 30%;
|
||||||
|
--radius: 0.5rem;
|
||||||
|
}
|
||||||
|
}
|
25
src/app/layout.tsx
Normal file
25
src/app/layout.tsx
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
import './globals.scss';
|
||||||
|
import { LayoutProps } from '@/types/layout';
|
||||||
|
import { getAssetUrl } from '@/helpers/assets';
|
||||||
|
import { Providers } from '@/components/providers';
|
||||||
|
|
||||||
|
export default async function RootLayout({children}: LayoutProps) {
|
||||||
|
return (
|
||||||
|
<html lang="en" className="h-full dark">
|
||||||
|
<head>
|
||||||
|
<title>Actaeon</title>
|
||||||
|
<link rel="preload" href={getAssetUrl('/fonts/rodinl.woff2')} as="font" type="font/woff2" crossOrigin="anonymous" />
|
||||||
|
<link rel="preload" href={getAssetUrl('/fonts/rodinm.woff2')} as="font" type="font/woff2" crossOrigin="anonymous" />
|
||||||
|
<link rel="preload" href={getAssetUrl('/fonts/rodindb.woff2')} as="font" type="font/woff2" crossOrigin="anonymous" />
|
||||||
|
<link rel="preload" href={getAssetUrl('/fonts/rodinb.woff2')} as="font" type="font/woff2" crossOrigin="anonymous" />
|
||||||
|
<link rel="preload" href={getAssetUrl('/fonts/rodineb.woff2')} as="font" type="font/woff2" crossOrigin="anonymous" />
|
||||||
|
<link rel="preload" href={getAssetUrl('/fonts/rodinub.woff2')} as="font" type="font/woff2" crossOrigin="anonymous" />
|
||||||
|
</head>
|
||||||
|
<body className="h-full">
|
||||||
|
<Providers>
|
||||||
|
{children}
|
||||||
|
</Providers>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
);
|
||||||
|
}
|
23
src/helpers/assets.ts
Normal file
23
src/helpers/assets.ts
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
let baseAssetUrl = process.env.NEXT_PUBLIC_ASSET_URL ?? process.env.ASSET_URL ?? '/';
|
||||||
|
if (!baseAssetUrl.endsWith('/')) baseAssetUrl += '/';
|
||||||
|
|
||||||
|
export const getAssetUrl = (path: string, extension?: `.${string}`) => {
|
||||||
|
path = path.replace(/^\/|\/$/g, '');
|
||||||
|
|
||||||
|
if (!extension)
|
||||||
|
return baseAssetUrl + path;
|
||||||
|
|
||||||
|
const parts = path.split('/');
|
||||||
|
let name = parts.pop()!;
|
||||||
|
const lastIndex = name.lastIndexOf('.');
|
||||||
|
if (lastIndex !== -1)
|
||||||
|
name = name.slice(0, lastIndex);
|
||||||
|
parts.push(name + extension);
|
||||||
|
|
||||||
|
return baseAssetUrl + parts.join('/');
|
||||||
|
};
|
||||||
|
|
||||||
|
export const getImageUrl = (path: string) => getAssetUrl(path, process.env.NEXT_PUBLIC_ASSET_IMAGE_EXTENSION as any);
|
||||||
|
export const getJacketUrl = (path: string) => getAssetUrl(path, process.env.NEXT_PUBLIC_ASSET_JACKET_EXTENSION as any);
|
||||||
|
export const getMusicUrl = (path: string) => getAssetUrl(path, process.env.NEXT_PUBLIC_ASSET_MUSIC_EXTENSION as any);
|
||||||
|
export const getAudioUrl = (path: string) => getAssetUrl(path, process.env.NEXT_PUBLIC_ASSET_AUDIO_EXTENSION as any);
|
5
src/types/layout.ts
Normal file
5
src/types/layout.ts
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
import { ReactNode } from 'react';
|
||||||
|
|
||||||
|
export type LayoutProps = Readonly<{
|
||||||
|
children: ReactNode
|
||||||
|
}>;
|
32
tailwind.base.ts
Normal file
32
tailwind.base.ts
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
import type { Config } from 'tailwindcss';
|
||||||
|
|
||||||
|
const config = {
|
||||||
|
mode: 'jit',
|
||||||
|
darkMode: ["class"],
|
||||||
|
content: [
|
||||||
|
"./node_modules/@nextui-org/theme/dist/**/*.{js,ts,jsx,tsx}",
|
||||||
|
'./pages/**/*.{ts,tsx}',
|
||||||
|
'./components/**/*.{ts,tsx}',
|
||||||
|
'./app/**/*.{ts,tsx}',
|
||||||
|
'./src/**/*.{ts,tsx}',
|
||||||
|
],
|
||||||
|
prefix: "",
|
||||||
|
theme: {
|
||||||
|
extend: {
|
||||||
|
screens: {
|
||||||
|
'3xl': '1600px',
|
||||||
|
'4xl': '1920px',
|
||||||
|
'5xl': '2560px',
|
||||||
|
'6xl': '3440px'
|
||||||
|
},
|
||||||
|
colors: {
|
||||||
|
'chuni-justice-critical': '#dfb920',
|
||||||
|
'chuni-justice': '#db7814',
|
||||||
|
'chuni-attack': '#61a873',
|
||||||
|
'chuni-miss': '#adadad'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} satisfies Config;
|
||||||
|
|
||||||
|
export default config;
|
38
tailwind.config.ts
Normal file
38
tailwind.config.ts
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
import type { Config } from "tailwindcss"
|
||||||
|
import baseConfig from './tailwind.base';
|
||||||
|
const {nextui} = require("@nextui-org/react");
|
||||||
|
|
||||||
|
const config = {
|
||||||
|
...baseConfig,
|
||||||
|
plugins: [require('tailwindcss-text-fill-stroke'), nextui({
|
||||||
|
themes: {
|
||||||
|
dark: {
|
||||||
|
colors: {
|
||||||
|
background: '#0d0a0f',
|
||||||
|
primary: '#9500ff',
|
||||||
|
focus: '#9500ff',
|
||||||
|
content1: '#050406',
|
||||||
|
content2: '#1f202d',
|
||||||
|
content3: '#303247',
|
||||||
|
content4: '#393b53',
|
||||||
|
}
|
||||||
|
},
|
||||||
|
light: {
|
||||||
|
colors: {
|
||||||
|
background: '#fefefe',
|
||||||
|
primary: {
|
||||||
|
DEFAULT: '#9500ff',
|
||||||
|
foreground: '#ffffff'
|
||||||
|
},
|
||||||
|
focus: {
|
||||||
|
DEFAULT: '#9500ff',
|
||||||
|
foreground: '#ffffff'
|
||||||
|
},
|
||||||
|
content1: '#f4f3f7'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})],
|
||||||
|
} satisfies Config
|
||||||
|
|
||||||
|
export default config
|
26
tsconfig.json
Normal file
26
tsconfig.json
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
{
|
||||||
|
"compilerOptions": {
|
||||||
|
"lib": ["dom", "dom.iterable", "esnext"],
|
||||||
|
"allowJs": true,
|
||||||
|
"skipLibCheck": true,
|
||||||
|
"strict": true,
|
||||||
|
"noEmit": true,
|
||||||
|
"esModuleInterop": true,
|
||||||
|
"module": "esnext",
|
||||||
|
"moduleResolution": "bundler",
|
||||||
|
"resolveJsonModule": true,
|
||||||
|
"isolatedModules": true,
|
||||||
|
"jsx": "preserve",
|
||||||
|
"incremental": true,
|
||||||
|
"plugins": [
|
||||||
|
{
|
||||||
|
"name": "next"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"paths": {
|
||||||
|
"@/*": ["./src/*"]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
|
||||||
|
"exclude": ["node_modules"]
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user