diff --git a/README.md b/README.md index c4033664f80d3cb9cb687fb5facbc82aedb302f6..ef635df85e70d1dfb3a90b5021e147e80e8d7f4f 100644 --- a/README.md +++ b/README.md @@ -1,36 +1,31 @@ -This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app). +# Dashboard zur Organisation von Vereinsaktivitäten -## Getting Started +Eine Anwendung zum Termine abzustimmen, planen weiterer Termine eines Vereins und zu koordinieren, entwickelt mit React, JavaScript, CSS und PHP. -First, run the development server: +## Installations- und Einrichtungsanweisungen -```bash -npm run dev -# or -yarn dev -# or -pnpm dev -# or -bun dev -``` +Klonen Sie dieses Repository. +Sie müssen `node`, `npm` und einen Webserver mit `PHP` und `MySQL` auf Ihrem Computer installiert haben. -Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. +#### Installation und Ausführung der React-Webseite: -You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file. +Installation : -This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font. +`npm install` -## Learn More +Server starten : -To learn more about Next.js, take a look at the following resources: +`npm run dev` -- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. -- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. +Webseite im Browser aufrufen: -You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome! +`localhost:3000/` -## Deploy on Vercel +#### Bereitstellen der Datenbank auf dem Webserver: -The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. +Importieren Sie die MySQL Datenbank `\database\event_management.sql` auf Ihrem Webserver. -Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details. + +#### Bereitstellen der API auf dem Webserver: + +Stellen Sie sicher, dass die Anwendung auf den MySQL-Server zugreifen kann, indem Sie die Verbindungsdaten (Benutzername, Passwort, Host, Datenbankname) in `server/reader.py` und `.env` aktualisieren. diff --git a/event_management.sql b/event_management.sql deleted file mode 100644 index e6009be4689b116a89363fc31893904975a65312..0000000000000000000000000000000000000000 --- a/event_management.sql +++ /dev/null @@ -1,259 +0,0 @@ --- phpMyAdmin SQL Dump --- version 5.2.1 --- https://www.phpmyadmin.net/ --- --- Host: 127.0.0.1 --- Erstellungszeit: 27. Aug 2024 um 23:22 --- Server-Version: 10.4.28-MariaDB --- PHP-Version: 8.2.4 - -SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; -START TRANSACTION; -SET time_zone = "+00:00"; - - -/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; -/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; -/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; -/*!40101 SET NAMES utf8mb4 */; - --- --- Datenbank: `event_management` --- - --- -------------------------------------------------------- - --- --- Tabellenstruktur für Tabelle `events` --- - -CREATE TABLE `events` ( - `eventId` int(11) NOT NULL, - `name` varchar(255) NOT NULL, - `location` varchar(255) DEFAULT NULL, - `website` varchar(255) DEFAULT NULL, - `description` text DEFAULT NULL, - `startTime` datetime DEFAULT NULL, - `endTime` datetime DEFAULT NULL, - `createdAt` timestamp NOT NULL DEFAULT current_timestamp(), - `updatedAt` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp() -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; - --- --- Daten für Tabelle `events` --- - -INSERT INTO `events` (`eventId`, `name`, `location`, `website`, `description`, `startTime`, `endTime`, `createdAt`, `updatedAt`) VALUES -(1, '24h Rennen', 'Berlin', 'https://www.veranstaltung1.de', '', '2024-08-12 11:00:00', '2024-08-13 11:00:00', '2024-06-10 10:14:14', '2024-08-18 22:00:44'), -(2, '6h Rennen', 'Hamburg', 'https://www.veranstaltung2.de', '', NULL, NULL, '2024-06-10 10:14:14', '2024-08-18 20:01:00'), -(3, 'Kids, Jugend Ride', 'München', 'https://www.veranstaltung3.de', '', NULL, NULL, '2024-06-10 10:14:14', '2024-08-18 20:02:59'), -(16, 'Laufrad Ride', '', '', '', NULL, NULL, '2024-08-18 20:03:21', '2024-08-18 20:03:21'); - --- -------------------------------------------------------- - --- --- Tabellenstruktur für Tabelle `groups` --- - -CREATE TABLE `groups` ( - `groupId` int(11) NOT NULL, - `name` varchar(255) NOT NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; - --- --- Daten für Tabelle `groups` --- - -INSERT INTO `groups` (`groupId`, `name`) VALUES -(1, 'Herren Elite'), -(2, 'Frauen Elite'); - --- -------------------------------------------------------- - --- --- Tabellenstruktur für Tabelle `groupsmn` --- - -CREATE TABLE `groupsmn` ( - `id` int(11) NOT NULL, - `eventId` int(11) NOT NULL, - `groupId` int(11) NOT NULL, - `raceType` int(11) NOT NULL, - `value` int(11) NOT NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; - --- --- Daten für Tabelle `groupsmn` --- - -INSERT INTO `groupsmn` (`id`, `eventId`, `groupId`, `raceType`, `value`) VALUES -(64, 2, 1, 2, 21600), -(65, 2, 2, 2, 21600), -(67, 16, 1, 1, 10), -(68, 16, 2, 1, 10), -(71, 3, 1, 2, 7200), -(72, 3, 2, 2, 7200), -(75, 1, 1, 2, 86400), -(76, 1, 2, 2, 86400); - --- -------------------------------------------------------- - --- --- Tabellenstruktur für Tabelle `participants` --- - -CREATE TABLE `participants` ( - `participantsId` int(11) NOT NULL, - `eventId` int(11) NOT NULL, - `startNumber` int(11) DEFAULT NULL, - `last_name` varchar(100) DEFAULT NULL, - `first_name` varchar(100) DEFAULT NULL, - `title` varchar(15) DEFAULT NULL, - `birth_year` int(11) DEFAULT NULL, - `birth_date` date DEFAULT NULL, - `gender` varchar(2) DEFAULT NULL, - `nationality` varchar(50) DEFAULT NULL, - `competition` int(11) DEFAULT NULL, - `club` varchar(100) DEFAULT NULL, - `license` varchar(25) DEFAULT NULL, - `status` int(11) DEFAULT NULL, - `comment` text DEFAULT NULL, - `transponder1` varchar(40) DEFAULT NULL, - `transponder2` varchar(40) DEFAULT NULL, - `reg_number` int(11) DEFAULT NULL, - `street` varchar(100) DEFAULT NULL, - `postal_code` varchar(10) DEFAULT NULL, - `city` varchar(50) DEFAULT NULL, - `state` varchar(3) DEFAULT NULL, - `country` varchar(50) DEFAULT NULL, - `email` varchar(100) DEFAULT NULL, - `phone` varchar(50) DEFAULT NULL, - `mobile` varchar(255) DEFAULT NULL, - `account_holder` varchar(50) DEFAULT NULL, - `account_number` varchar(12) DEFAULT NULL, - `bank_code` varchar(12) DEFAULT NULL, - `bank_name` varchar(50) DEFAULT NULL, - `iban` varchar(36) DEFAULT NULL, - `bic` varchar(11) DEFAULT NULL, - `sepa_mandate` varchar(35) DEFAULT NULL, - `createdAt` timestamp NOT NULL DEFAULT current_timestamp(), - `updatedAt` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp() -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; - --- --- Daten für Tabelle `participants` --- - -INSERT INTO `participants` (`participantsId`, `eventId`, `startNumber`, `last_name`, `first_name`, `title`, `birth_year`, `birth_date`, `gender`, `nationality`, `competition`, `club`, `license`, `status`, `comment`, `transponder1`, `transponder2`, `reg_number`, `street`, `postal_code`, `city`, `state`, `country`, `email`, `phone`, `mobile`, `account_holder`, `account_number`, `bank_code`, `bank_name`, `iban`, `bic`, `sepa_mandate`, `createdAt`, `updatedAt`) VALUES -(1, 1, 10, 'Küpper', 'Jan', NULL, 1998, '1998-10-31', 'M', NULL, 1, NULL, NULL, NULL, NULL, '400017B5E758E1DE023F4DCDC553D8D743E05F75', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'jan.kuepper1998@googlemail.com', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2024-06-14 13:06:00', '2024-08-11 09:00:22'), -(3, 1, 11, 'Mustermann', 'Max', NULL, NULL, NULL, NULL, NULL, 1, NULL, NULL, NULL, NULL, '4000FEFD8EFB8FA80237E02626872E6B03DD3928', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'max.mustermann@mail.com', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2024-06-14 14:09:27', '2024-07-22 10:47:14'); - --- -------------------------------------------------------- - --- --- Tabellenstruktur für Tabelle `tracking` --- - -CREATE TABLE `tracking` ( - `trackingId` int(11) NOT NULL, - `transponder` varchar(40) DEFAULT NULL, - `eventId` int(11) NOT NULL, - `time` float DEFAULT NULL, - `hits` int(11) DEFAULT NULL, - `timingPoint` varchar(100) DEFAULT NULL, - `decoderId` varchar(50) DEFAULT NULL, - `utcTime` datetime DEFAULT NULL, - `createdAt` timestamp NOT NULL DEFAULT current_timestamp(), - `updatedAt` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp() -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; - --- --- Daten für Tabelle `tracking` --- - -INSERT INTO `tracking` (`trackingId`, `transponder`, `eventId`, `time`, `hits`, `timingPoint`, `decoderId`, `utcTime`, `createdAt`, `updatedAt`) VALUES -(110, '400095273856E472028396604E945EBE42B0DF60', 1, 2049.12, 5, 'Finish Line', '1', '2024-08-12 13:34:57', '2024-07-22 10:44:31', '2024-08-19 19:42:12'), -(111, '4000FEFD8EFB8FA80237E02626872E6B03DD3928', 1, 2232.7, 5, 'Finish Line', '1', '2024-08-12 13:34:57', '2024-07-22 10:44:31', '2024-08-19 19:42:12'), -(112, '400095273856E472028396604E945EBE42B0DF60', 1, 300102, 7, 'Finish Line', '1', '2024-08-12 13:34:57', '2024-07-22 10:44:36', '2024-08-19 19:42:12'), -(113, '4000FEFD8EFB8FA80237E02626872E6B03DD3928', 1, 350233, 8, 'Finish Line', '1', '2024-08-12 13:34:57', '2024-07-22 10:44:37', '2024-08-19 19:42:12'), -(114, '400095273856E472028396604E945EBE42B0DF60', 1, 600102, 7, 'Finish Line', '1', '2024-08-12 13:34:57', '2024-07-22 10:44:36', '2024-08-19 19:42:12'), -(115, '4000FEFD8EFB8FA80237E02626872E6B03DD3928', 1, 750233, 8, 'Finish Line', '1', '2024-08-12 13:34:57', '2024-07-22 10:44:37', '2024-08-19 19:42:12'), -(812, '400017B5E758E1DE023F4DCDC553D8D743E05F75', 1, 47.4715, 1, 'Finish Line', '1', '2024-08-12 13:34:56', '2024-08-12 11:34:57', '2024-08-19 19:42:12'), -(813, '400017B5E758E1DE023F4DCDC553D8D743E05F75', 1, 1055.3, 2, 'Finish Line', '1', '2024-08-12 13:34:57', '2024-08-12 11:34:58', '2024-08-19 19:42:12'), -(814, '400017B5E758E1DE023F4DCDC553D8D743E05F75', 1, 2062.16, 2, 'Finish Line', '1', '2024-08-12 13:34:58', '2024-08-12 11:34:59', '2024-08-19 19:42:12'), -(815, '400017B5E758E1DE023F4DCDC553D8D743E05F75', 1, 3068.34, 1, 'Finish Line', '1', '2024-08-12 13:34:59', '2024-08-12 11:35:00', '2024-08-19 19:42:12'), -(816, '400017B5E758E1DE023F4DCDC553D8D743E05F75', 1, 4074.2, 1, 'Finish Line', '1', '2024-08-12 13:35:00', '2024-08-12 11:35:01', '2024-08-19 19:42:12'), -(817, '400017B5E758E1DE023F4DCDC553D8D743E05F75', 1, 5079.34, 2, 'Finish Line', '1', '2024-08-12 13:35:01', '2024-08-12 11:35:02', '2024-08-19 19:42:12'); - --- --- Indizes der exportierten Tabellen --- - --- --- Indizes für die Tabelle `events` --- -ALTER TABLE `events` - ADD PRIMARY KEY (`eventId`); - --- --- Indizes für die Tabelle `groups` --- -ALTER TABLE `groups` - ADD PRIMARY KEY (`groupId`); - --- --- Indizes für die Tabelle `groupsmn` --- -ALTER TABLE `groupsmn` - ADD PRIMARY KEY (`id`); - --- --- Indizes für die Tabelle `participants` --- -ALTER TABLE `participants` - ADD PRIMARY KEY (`participantsId`); - --- --- Indizes für die Tabelle `tracking` --- -ALTER TABLE `tracking` - ADD PRIMARY KEY (`trackingId`); - --- --- AUTO_INCREMENT für exportierte Tabellen --- - --- --- AUTO_INCREMENT für Tabelle `events` --- -ALTER TABLE `events` - MODIFY `eventId` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=17; - --- --- AUTO_INCREMENT für Tabelle `groups` --- -ALTER TABLE `groups` - MODIFY `groupId` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; - --- --- AUTO_INCREMENT für Tabelle `groupsmn` --- -ALTER TABLE `groupsmn` - MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=77; - --- --- AUTO_INCREMENT für Tabelle `participants` --- -ALTER TABLE `participants` - MODIFY `participantsId` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=12; - --- --- AUTO_INCREMENT für Tabelle `tracking` --- -ALTER TABLE `tracking` - MODIFY `trackingId` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=818; -COMMIT; - -/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; -/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; -/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; diff --git a/server/config.json b/server/config.json index 40d25e857b29f9154058f64e0a44fa9e6d2fb345..77ad6bc3089845bb3f87d6c7d3d28e41279e1470 100644 --- a/server/config.json +++ b/server/config.json @@ -4,10 +4,5 @@ "event_id": 1, "connection_type": "com_port", "connection_value": "COM5", - "database": "event_management", - "password": "admin", - "user": "jan", - "host": "localhost", - "timedelta": "5", - "event_name": "Adler MTB Cup" + "timedelta": "10" } \ No newline at end of file