Initial commit

This commit is contained in:
Esa Kataja
2024-10-11 19:44:42 +03:00
commit 8435186706
17 changed files with 2630 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
node_modules
# Output
.output
.vercel
/.svelte-kit
/build
# OS
.DS_Store
Thumbs.db
# Env
.env
.env.*
!.env.example
!.env.test
# Vite
vite.config.js.timestamp-*
vite.config.ts.timestamp-*
+1
View File
@@ -0,0 +1 @@
engine-strict=true
+4
View File
@@ -0,0 +1,4 @@
# Package Managers
package-lock.json
pnpm-lock.yaml
yarn.lock
+8
View File
@@ -0,0 +1,8 @@
{
"useTabs": true,
"singleQuote": true,
"trailingComma": "none",
"printWidth": 100,
"plugins": ["prettier-plugin-svelte"],
"overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }]
}
+59
View File
@@ -0,0 +1,59 @@
# Levyraati 2024
## Overview
**Levyraati 2024** is a web application built with SvelteKit, designed to offer a fun, interactive platform for a group of panelists to review and rate songs. Panelists can submit songs via YouTube links or by uploading audio files (MP3, OGG, etc.). The app supports events where songs are listened to in rounds, rated by the panelists, and a winner is announced based on total points scored.
> ⚠️ Note: This project is still in the early stages of development. Features and functionality may change as we continue to improve. Feedback is always welcome!
## Features
- **Create Events**: A user can create an event and invite others to join.
- **Song Submission**: Panelists can submit songs either by providing a YouTube link or by uploading audio files.
- **Rating System**: Each panelist rates the songs on a scale from 1 to 10.
- **Round-Based Listening**: The songs are played in rounds, and ratings are collected for each song.
- **Winner Announcement**: The app automatically calculates and announces the song with the highest score as the winner.
## Usage
1. **Create an Event: A user can create a new event and invite panelists via email.**
2. **Join an Event: Invited panelists can join the event using the invitation link sent to their email.**
3. **Submit Songs: Each panelist submits a song for review before the event date.**
4. **Rate Songs: During the event, songs are played one by one, and panelists provide their ratings.**
5. **View Results: After all songs have been rated, the app calculates the total scores and announces the winner.**
## Technologies Used
- SvelteKit: For building the apps user interface and handling routing.
- SQLite: Lightweight default database (easily swappable for other databases like PostgreSQL for production).
- Tailwind CSS: For styling and responsive design.
- JavaScript / TypeScript: Primary languages for scripting and functionality.
- Vite: For fast builds and hot module replacement.
- YouTube API: (optional) for handling YouTube links if needed.
## License
This project is licensed under the MIT License - see the LICENSE file for details.
## Installation & Setup
1. **Clone the repository:**
```bash
git clone https://git.kessinen.com:3000/Kessinen/levyraati2024-frontend.git
cd levyraati-2024
```
2. **Install dependencies:**
```bash
npm install
```
3. **Start the development server:**
```bash
npm run dev
```
4. **Build for production:**
```bash
npm run build
```
5. **Preview production build:**
```bash
npm run preview
```
+23
View File
@@ -0,0 +1,23 @@
import js from '@eslint/js';
import svelte from 'eslint-plugin-svelte';
import prettier from 'eslint-config-prettier';
import globals from 'globals';
/** @type {import('eslint').Linter.Config[]} */
export default [
js.configs.recommended,
...svelte.configs['flat/recommended'],
prettier,
...svelte.configs['flat/prettier'],
{
languageOptions: {
globals: {
...globals.browser,
...globals.node
}
}
},
{
ignores: ['build/', '.svelte-kit/', 'dist/']
}
];
+30
View File
@@ -0,0 +1,30 @@
{
"name": "levyraati2024-frontend",
"version": "0.0.1",
"private": true,
"scripts": {
"dev": "vite dev",
"build": "vite build",
"preview": "vite preview",
"lint": "prettier --check . && eslint .",
"format": "prettier --write ."
},
"devDependencies": {
"@sveltejs/adapter-auto": "^3.0.0",
"@sveltejs/kit": "^2.0.0",
"@sveltejs/vite-plugin-svelte": "^3.0.0",
"@types/eslint": "^9.6.0",
"autoprefixer": "^10.4.20",
"eslint": "^9.0.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-svelte": "^2.36.0",
"globals": "^15.0.0",
"postcss": "^8.4.47",
"prettier": "^3.1.1",
"prettier-plugin-svelte": "^3.1.2",
"svelte": "^4.2.7",
"tailwindcss": "^3.4.13",
"vite": "^5.0.3"
},
"type": "module"
}
+2426
View File
File diff suppressed because it is too large Load Diff
+6
View File
@@ -0,0 +1,6 @@
export default {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
}
+3
View File
@@ -0,0 +1,3 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
+16
View File
@@ -0,0 +1,16 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="%sveltekit.assets%/favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>AsematienLevyraati 2024</title>
%sveltekit.head%
</head>
<body data-sveltekit-preload-data="hover">
<div style="display: contents">%sveltekit.body%</div>
</body>
</html>
+1
View File
@@ -0,0 +1 @@
// place files you want to import through the `$lib` alias in this folder.
+5
View File
@@ -0,0 +1,5 @@
<script>
import '../app.css';
</script>
<slot />
View File
+13
View File
@@ -0,0 +1,13 @@
import adapter from '@sveltejs/adapter-auto';
/** @type {import('@sveltejs/kit').Config} */
const config = {
kit: {
// adapter-auto only supports some environments, see https://kit.svelte.dev/docs/adapter-auto for a list.
// If your environment is not supported, or you settled on a specific environment, switch out the adapter.
// See https://kit.svelte.dev/docs/adapters for more information about adapters.
adapter: adapter()
}
};
export default config;
+8
View File
@@ -0,0 +1,8 @@
/** @type {import('tailwindcss').Config} */
export default {
content: ['./src/**/*.{html,js,svelte,ts}'],
theme: {
extend: {}
},
plugins: []
};
+6
View File
@@ -0,0 +1,6 @@
import { sveltekit } from '@sveltejs/kit/vite';
import { defineConfig } from 'vite';
export default defineConfig({
plugins: [sveltekit()]
});