Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: imagine an app #461

Draft
wants to merge 12 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 11 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
NITRO_DISCORD_CLIENT_ID=
NITRO_DISCORD_CLIENT_SECRET=

NITRO_ORIGIN=http://localhost:3000

# The key for encrypting auth tokens, >=32 characters long:
NITRO_AUTH_SECRET=
2 changes: 1 addition & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": ["plugin:@next/eslint-plugin-next/recommended", "@sapphire", "plugin:import/typescript"],
"extends": ["@sapphire", "plugin:import/typescript"],
"parserOptions": {
"ecmaVersion": 2020,
"sourceType": "module",
Expand Down
5 changes: 3 additions & 2 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
---

name: Bug report
about: Create a report to help us improve
title: 'bug: '
labels: 'Bug: Unverified'
assignees: ''
---**Describe the bug**
---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Expand Down
5 changes: 3 additions & 2 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
---

name: Feature request
about: Suggest an idea for this project
title: 'request: '
labels: 'Meta: Feature'
assignees: ''
---**Is your feature request related to a problem? Please describe.**
---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
Expand Down
54 changes: 20 additions & 34 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,40 +1,26 @@
# dependencies
node_modules/
.pnp/
package-lock.json
.pnp.js
# Nuxt dev/build outputs
.output
.data
.nuxt
.nitro
.cache
dist

# production
build/
dist/
.next/
.tsbuildinfo
sitemap.xml
sw.js
workbox*.js
local.Dockerfile
*.tsbuildinfo
# Node dependencies
node_modules

# misc
.DS_Store
Thumbs.db

# Local env vars
.env.local
.env.development.local
.env.test.local
.env.production.local
# Logs
logs
*.log

# IDE Settings
.idea/
.vs/
# Misc
.DS_Store
.fleet
.idea

# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*
*.log
# Local env files
.env
.env.*
!.env.example

# Yarn files
.yarn/install-state.gz
.yarn/build-state.yml
7 changes: 5 additions & 2 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
src/.next/
src/next-env.d.ts
.nuxt/
.yarn/
.output/
dist/
node_modules/
19 changes: 19 additions & 0 deletions .prettierrc.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import sapphirePrettierConfig from '@sapphire/prettier-config';

/** @type {import('prettier').Config} */
export default {
...sapphirePrettierConfig,
plugins: ['prettier-plugin-tailwindcss'],
overrides: [
...sapphirePrettierConfig.overrides,
{
files: ['README.md'],
options: {
tabWidth: 2,
useTabs: false,
printWidth: 80,
proseWrap: 'always'
}
}
]
};
6 changes: 4 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{
"files.eol": "\n",
"typescript.tsdk": "node_modules\\typescript\\lib"
"files.associations": {
"*.css": "tailwindcss"
},
"css.lint.unknownAtRules": "ignore"
}
546 changes: 0 additions & 546 deletions .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs

This file was deleted.

9 changes: 0 additions & 9 deletions .yarn/plugins/@yarnpkg/plugin-typescript.cjs

This file was deleted.

28 changes: 0 additions & 28 deletions .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs

This file was deleted.

873 changes: 0 additions & 873 deletions .yarn/releases/yarn-3.4.1.cjs

This file was deleted.

925 changes: 925 additions & 0 deletions .yarn/releases/yarn-4.4.0.cjs

Large diffs are not rendered by default.

14 changes: 5 additions & 9 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
compressionLevel: mixed

enableGlobalCache: true

gitHooksPath: .github/hooks

nodeLinker: node-modules

plugins:
- path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs
spec: '@yarnpkg/plugin-workspace-tools'
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
spec: '@yarnpkg/plugin-interactive-tools'
- path: .yarn/plugins/@yarnpkg/plugin-typescript.cjs
spec: '@yarnpkg/plugin-typescript'
- path: .yarn/plugins/@yarnpkg/plugin-git-hooks.cjs
spec: 'https://raw.githubusercontent.com/trufflehq/yarn-plugin-git-hooks/main/bundles/%40yarnpkg/plugin-git-hooks.js'

yarnPath: .yarn/releases/yarn-3.4.1.cjs

gitHooksPath: .github/hooks
yarnPath: .yarn/releases/yarn-4.4.0.cjs
32 changes: 20 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,16 @@ After forking/cloning this repo to a folder locally:

1. Duplicate `.env.development` and rename it to `.env.development.local`
2. Replace the value of `NEXT_PUBLIC_CLIENT_ID` to your bot's ID
3. Go to the Discord developer portal: https://discord.com/developers/applications/
3. Go to the Discord developer portal:
https://discord.com/developers/applications/
4. Select your bot application and go to the `OAuth2` tab
5. Add redirect URL's for `http://localhost:3000/oauth/callback` and `http://localhost:3000/oauth/guild`
6. Run a local instance of Skyra, be sure to follow it's local development guidelines as well.
5. Add redirect URL's for `http://localhost:3000/oauth/callback` and
`http://localhost:3000/oauth/guild`
6. Run a local instance of Skyra, be sure to follow it's local development
guidelines as well.

- You have to set the CLIENT_ID, CLIENT_SECRET in Skyra's configuration to your own bot properly!
- You have to set the CLIENT_ID, CLIENT_SECRET in Skyra's configuration to your
own bot properly!

7. Install dependencies with `yarn`.
8. Run `yarn dev` to start the NextJS dev server
Expand All @@ -24,16 +28,18 @@ After forking/cloning this repo to a folder locally:

**Skyra links**

- [Skyra Invite Link](https://invite.skyra.pw)
- [Support Server](https://join.skyra.pw)
- [Patreon](https://donate.skyra.pw/patreon)
- [Skyra Invite Link](https://invite.skyra.pw)
- [Support Server](https://join.skyra.pw)
- [Patreon](https://donate.skyra.pw/patreon)

## Buy us some doughnuts

Skyra Project is open source and always will be, even if we don't get donations. That said, we know there are amazing people who
may still want to donate just to show their appreciation. Thanks you very much in advance!
Skyra Project is open source and always will be, even if we don't get donations.
That said, we know there are amazing people who may still want to donate just to
show their appreciation. Thanks you very much in advance!

We accept donations through Patreon, BitCoin, Ethereum, and Litecoin. You can use the buttons below to donate through your method of choice.
We accept donations through Patreon, BitCoin, Ethereum, and Litecoin. You can
use the buttons below to donate through your method of choice.

| Donate With | QR | Address |
| :---------: | :----------------: | :---------------------------------------------------------------------------------------------------------------------------------------: |
Expand All @@ -45,15 +51,17 @@ We accept donations through Patreon, BitCoin, Ethereum, and Litecoin. You can us

## Contributors

Please make sure to read the [Contributing Guide][contributing] before making a pull request.
Please make sure to read the [Contributing Guide][contributing] before making a
pull request.

Thank you to all the people who already contributed to Skyra Project!

<a href="https://github.com/skyra-project/skyra.pw/graphs/contributors">
<img src="https://contrib.rocks/image?repo=skyra-project/skyra.pw" />
</a>

[contributing]: https://github.com/skyra-project/.github/blob/main/.github/CONTRIBUTING.md
[contributing]:
https://github.com/skyra-project/.github/blob/main/.github/CONTRIBUTING.md
[patreonimage]: https://cdn.skyra.pw/gh-assets/patreon.png
[paypalimage]: https://cdn.skyra.pw/gh-assets/paypal.png
[bitcoinimage]: https://cdn.skyra.pw/gh-assets/bitcoin.png
Expand Down
24 changes: 24 additions & 0 deletions app.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<template>
<nuxt-loading-indicator />
<nuxt-layout name="main">
<nuxt-page />
</nuxt-layout>
</template>

<script setup lang="ts">
const router = useRouter();
const appName = ref<'artiel' | 'iriss' | 'nekokai' | 'skyra' | 'teryl'>('skyra');
watch(
router.currentRoute,
(v) => {
if (v.path.startsWith('/artiel')) appName.value = 'artiel';
else if (v.path.startsWith('/iriss')) appName.value = 'iriss';
else if (v.path.startsWith('/nekokai')) appName.value = 'nekokai';
else if (v.path.startsWith('/teryl')) appName.value = 'teryl';
else appName.value = 'skyra';
},
{ immediate: true }
);

provide(ProviderAppNameKey, appName);
</script>
13 changes: 13 additions & 0 deletions assets/css/tailwind.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
@tailwind base;
@tailwind components;
@tailwind utilities;

@layer components {
.icon {
vertical-align: text-bottom !important;
}

.prose {
@apply max-w-none;
}
}
54 changes: 54 additions & 0 deletions components/app-footer.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
<template>
<footer class="footer mt-24 bg-base-200 p-10 text-base-content">
<aside>
<IconsSkyra class="h-12 w-12" />
<p>Skyra Project<br />Providing reliable open-source software since 2017</p>
<p>© 2024 All rights reserved.</p>
</aside>
<nav>
<h6 class="footer-title">Links</h6>
<nuxt-link class="link-hover link" to="https://join.skyra.pw">
<Icon name="ph:discord-logo-duotone" class="h-5 w-5 text-indigo-500" />
Support Server
</nuxt-link>
<nuxt-link class="link-hover link" to="https://github.com/skyra-project">
<Icon name="ph:github-logo-duotone" class="h-5 w-5 text-indigo-500" />
GitHub</nuxt-link
>
<nuxt-link class="link-hover link" to="https://blog.skyra.pw">
<Icon name="ph:newspaper-clipping-duotone" class="h-5 w-5 text-primary" />
Blog
</nuxt-link>
<nuxt-link class="link-hover link" to="https://hastebin.skyra.pw">
<Icon name="ph:code-block-duotone" class="h-5 w-5 text-green-600" />
Hastebin
</nuxt-link>
</nav>
<nav>
<h6 class="footer-title">Donate</h6>
<nuxt-link class="link-hover link" to="https://donate.skyra.pw/patreon">
<Icon name="ph:patreon-logo-duotone" class="h-5 w-5 text-rose-600" />
Patreon
</nuxt-link>
<nuxt-link class="link-hover link" to="https://donate.skyra.pw/paypal">
<Icon name="ph:paypal-logo-duotone" class="h-5 w-5 text-sky-600" />
PayPal
</nuxt-link>
<nuxt-link class="link-hover link" to="https://donate.skyra.pw/kofi">
<Icon name="ph:coffee-duotone" class="h-5 w-5 text-pink-500" />
Ko-fi
</nuxt-link>
</nav>
<nav>
<h6 class="footer-title">Legal</h6>
<nuxt-link class="link-hover link" to="/terms">
<Icon name="ph:scales-fill" class="h-5 w-5 text-warning" />
Terms of Use
</nuxt-link>
<nuxt-link class="link-hover link" to="/privacy">
<Icon name="ph:scales-fill" class="h-5 w-5 text-warning" />
Privacy Policy
</nuxt-link>
</nav>
</footer>
</template>
Loading