Skip to content

Commit

Permalink
Changed project names (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
spietras authored Oct 19, 2024
1 parent 9685133 commit 4c30abc
Show file tree
Hide file tree
Showing 31 changed files with 139 additions and 142 deletions.
14 changes: 7 additions & 7 deletions .copier-answers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
_commit: 0.2.0
_src_path: gh:radio-aktywne/template-app-next
accountname: radio-aktywne
appname: webrecords
appname: magnolia
description: Broadcast recordings app 📼
docs: true
docsurl: https://radio-aktywne.github.io/webrecords
envprefix: WEBRECORDS
imagename: apps/webrecords
keyprefix: webrecords
docsurl: https://radio-aktywne.github.io/magnolia
envprefix: MAGNOLIA
imagename: apps/magnolia
keyprefix: magnolia
port: 38000
registry: true
releases: true
reponame: webrecords
repourl: https://github.com/radio-aktywne/webrecords
reponame: magnolia
repourl: https://github.com/radio-aktywne/magnolia
4 changes: 2 additions & 2 deletions .github/workflows/registry.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ jobs:
push: true
# Slashes are here to make the string multiline and avoid using spaces
tags: "\
ghcr.io/radio-aktywne/apps/webrecords\
ghcr.io/radio-aktywne/apps/magnolia\
:latest,\
ghcr.io/radio-aktywne/apps/webrecords\
ghcr.io/radio-aktywne/apps/magnolia\
:${{ github.event.release.tag_name }}"
# Cache Docker layers between builds
cache-from: type=gha,scope=${{ github.workflow }}
Expand Down
12 changes: 6 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ The whole development environment will be running inside a container.
If you open the project in `Visual Studio Code`,
you should be prompted to reopen the project in a `Dev Container`.
You can also click
[here](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/radio-aktywne/webrecords)
[here](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/radio-aktywne/magnolia)
or on the badge below to tell `Visual Studio Code`
to open the project in a `Dev Container`.

<div align="center">

[![Open in Dev Container](https://img.shields.io/static/v1?label=Dev%20Containers&message=Open&color=blue&logo=visualstudiocode)](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/radio-aktywne/webrecords)
[![Open in Dev Container](https://img.shields.io/static/v1?label=Dev%20Containers&message=Open&color=blue&logo=visualstudiocode)](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/radio-aktywne/magnolia)

</div>

Expand Down Expand Up @@ -100,7 +100,7 @@ Here are the most common ones, using `Task`:

Linting is automatically run on every pull request and push to the `main` branch.
You can find the `GitHub Actions` workflow that does this in
[`.github/workflows/lint.yaml`](https://github.com/radio-aktywne/webrecords/blob/main/.github/workflows/lint.yaml).
[`.github/workflows/lint.yaml`](https://github.com/radio-aktywne/magnolia/blob/main/.github/workflows/lint.yaml).

If you use the `Dev Container` setup,
you will have the `Trunk` extension installed in `Visual Studio Code`.
Expand Down Expand Up @@ -153,13 +153,13 @@ Every time you create a new release on `GitHub`,
a `GitHub Actions` workflow will automatically build and publish a new `Docker` image
to the `GitHub Container Registry`.
You can find the `GitHub Actions` workflow that does this in
[`.github/workflows/registry.yaml`](https://github.com/radio-aktywne/webrecords/blob/main/.github/workflows/registry.yaml).
[`.github/workflows/registry.yaml`](https://github.com/radio-aktywne/magnolia/blob/main/.github/workflows/registry.yaml).

## 📄 Docs

This project uses [`Docusaurus`](https://docusaurus.io) to generate documentation.
The documentation is hosted on `GitHub Pages` and can be found
[here](https://radio-aktywne.github.io/webrecords).
[here](https://radio-aktywne.github.io/magnolia).
All the documentation files are located in the `docs` directory.

To build and serve the documentation locally,
Expand All @@ -174,4 +174,4 @@ This will start a local server that will serve the documentation.
The documentation is automatically built and deployed to `GitHub Pages`
whenever a commit is pushed to the `main` branch.
You can find the `GitHub Actions` workflow that does this in
[`.github/workflows/docs.yaml`](https://github.com/radio-aktywne/webrecords/blob/main/.github/workflows/docs.yaml).
[`.github/workflows/docs.yaml`](https://github.com/radio-aktywne/magnolia/blob/main/.github/workflows/docs.yaml).
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
<h1 align="center">webrecords</h1>
<h1 align="center">magnolia</h1>

<div align="center">

Broadcast recordings app 📼

[![Lint](https://github.com/radio-aktywne/webrecords/actions/workflows/lint.yaml/badge.svg)](https://github.com/radio-aktywne/webrecords/actions/workflows/lint.yaml)
[![Image](https://github.com/radio-aktywne/webrecords/actions/workflows/image.yaml/badge.svg)](https://github.com/radio-aktywne/webrecords/actions/workflows/image.yaml)
[![Registry](https://github.com/radio-aktywne/webrecords/actions/workflows/registry.yaml/badge.svg)](https://github.com/radio-aktywne/webrecords/actions/workflows/registry.yaml)
[![Docs](https://github.com/radio-aktywne/webrecords/actions/workflows/docs.yaml/badge.svg)](https://github.com/radio-aktywne/webrecords/actions/workflows/docs.yaml)
[![Lint](https://github.com/radio-aktywne/magnolia/actions/workflows/lint.yaml/badge.svg)](https://github.com/radio-aktywne/magnolia/actions/workflows/lint.yaml)
[![Image](https://github.com/radio-aktywne/magnolia/actions/workflows/image.yaml/badge.svg)](https://github.com/radio-aktywne/magnolia/actions/workflows/image.yaml)
[![Registry](https://github.com/radio-aktywne/magnolia/actions/workflows/registry.yaml/badge.svg)](https://github.com/radio-aktywne/magnolia/actions/workflows/registry.yaml)
[![Docs](https://github.com/radio-aktywne/magnolia/actions/workflows/docs.yaml/badge.svg)](https://github.com/radio-aktywne/magnolia/actions/workflows/docs.yaml)

</div>

---

## 💡 About

`webrecords` is a web app for managing recordings of live broadcasts.
`magnolia` is a web app for managing recordings of live broadcasts.

## 📄 Further Reading

More in-depth documentation can be found
[here](https://radio-aktywne.github.io/webrecords).
[here](https://radio-aktywne.github.io/magnolia).

## 💻 Development

Read more about how to develop the project
[here](https://github.com/radio-aktywne/webrecords/blob/main/CONTRIBUTING.md).
[here](https://github.com/radio-aktywne/magnolia/blob/main/CONTRIBUTING.md).
22 changes: 11 additions & 11 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
services:
webrecords:
magnolia:
build:
context: ./
network: host
environment:
- "WEBRECORDS__SERVER__HOST=${WEBRECORDS__SERVER__HOST:-0.0.0.0}"
- "WEBRECORDS__SERVER__PORT=${WEBRECORDS__SERVER__PORT:-38000}"
- "WEBRECORDS__EMIRECORDS__HTTP__SCHEME=${WEBRECORDS__EMIRECORDS__HTTP__SCHEME:-http}"
- "WEBRECORDS__EMIRECORDS__HTTP__HOST=${WEBRECORDS__EMIRECORDS__HTTP__HOST:-localhost}"
- "WEBRECORDS__EMIRECORDS__HTTP__PORT=${WEBRECORDS__EMIRECORDS__HTTP__PORT:-31000}"
- "WEBRECORDS__EMIRECORDS__HTTP__PATH=${WEBRECORDS__EMIRECORDS__HTTP__PATH:-}"
- "WEBRECORDS__EMISHOWS__HTTP__SCHEME=${WEBRECORDS__EMISHOWS__HTTP__SCHEME:-http}"
- "WEBRECORDS__EMISHOWS__HTTP__HOST=${WEBRECORDS__EMISHOWS__HTTP__HOST:-localhost}"
- "WEBRECORDS__EMISHOWS__HTTP__PORT=${WEBRECORDS__EMISHOWS__HTTP__PORT:-35000}"
- "WEBRECORDS__EMISHOWS__HTTP__PATH=${WEBRECORDS__EMISHOWS__HTTP__PATH:-}"
- "MAGNOLIA__SERVER__HOST=${MAGNOLIA__SERVER__HOST:-0.0.0.0}"
- "MAGNOLIA__SERVER__PORT=${MAGNOLIA__SERVER__PORT:-38000}"
- "MAGNOLIA__BEAVER__HTTP__SCHEME=${MAGNOLIA__BEAVER__HTTP__SCHEME:-http}"
- "MAGNOLIA__BEAVER__HTTP__HOST=${MAGNOLIA__BEAVER__HTTP__HOST:-localhost}"
- "MAGNOLIA__BEAVER__HTTP__PORT=${MAGNOLIA__BEAVER__HTTP__PORT:-35000}"
- "MAGNOLIA__BEAVER__HTTP__PATH=${MAGNOLIA__BEAVER__HTTP__PATH:-}"
- "MAGNOLIA__GECKO__HTTP__SCHEME=${MAGNOLIA__GECKO__HTTP__SCHEME:-http}"
- "MAGNOLIA__GECKO__HTTP__HOST=${MAGNOLIA__GECKO__HTTP__HOST:-localhost}"
- "MAGNOLIA__GECKO__HTTP__PORT=${MAGNOLIA__GECKO__HTTP__PORT:-31000}"
- "MAGNOLIA__GECKO__HTTP__PATH=${MAGNOLIA__GECKO__HTTP__PATH:-}"
network_mode: host
4 changes: 2 additions & 2 deletions docs/docs/01-Index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ slug: /
title: Index
---

# webrecords
# magnolia

Broadcast recordings app 📼

## 💡 About

`webrecords` is a web app for managing recordings of live broadcasts.
`magnolia` is a web app for managing recordings of live broadcasts.
40 changes: 20 additions & 20 deletions docs/docs/03-Configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,33 +7,33 @@ title: Configuration

You can configure the app at runtime using various environment variables:

- `WEBRECORDS__SERVER__HOST` -
- `MAGNOLIA__SERVER__HOST` -
host to run the server on
(default: `0.0.0.0`)
- `WEBRECORDS__SERVER__PORT` -
- `MAGNOLIA__SERVER__PORT` -
port to run the server on
(default: `38000`)
- `WEBRECORDS__EMIRECORDS__HTTP__SCHEME`
scheme of the HTTP API of the emirecords service
- `MAGNOLIA__BEAVER__HTTP__SCHEME`
scheme of the HTTP API of the beaver service
(default: `http`)
- `WEBRECORDS__EMIRECORDS__HTTP__HOST`
host of the HTTP API of the emirecords service
- `MAGNOLIA__BEAVER__HTTP__HOST`
host of the HTTP API of the beaver service
(default: `localhost`)
- `WEBRECORDS__EMIRECORDS__HTTP__PORT`
port of the HTTP API of the emirecords service
(default: `31000`)
- `WEBRECORDS__EMIRECORDS__HTTP__PATH`
path of the HTTP API of the emirecords service
- `MAGNOLIA__BEAVER__HTTP__PORT`
port of the HTTP API of the beaver service
(default: `35000`)
- `MAGNOLIA__BEAVER__HTTP__PATH`
path of the HTTP API of the beaver service
(default: ``)
- `WEBRECORDS__EMISHOWS__HTTP__SCHEME`
scheme of the HTTP API of the emishows service
- `MAGNOLIA__GECKO__HTTP__SCHEME`
scheme of the HTTP API of the gecko service
(default: `http`)
- `WEBRECORDS__EMISHOWS__HTTP__HOST`
host of the HTTP API of the emishows service
- `MAGNOLIA__GECKO__HTTP__HOST`
host of the HTTP API of the gecko service
(default: `localhost`)
- `WEBRECORDS__EMISHOWS__HTTP__PORT`
port of the HTTP API of the emishows service
(default: `35000`)
- `WEBRECORDS__EMISHOWS__HTTP__PATH`
path of the HTTP API of the emishows service
- `MAGNOLIA__GECKO__HTTP__PORT`
port of the HTTP API of the gecko service
(default: `31000`)
- `MAGNOLIA__GECKO__HTTP__PATH`
path of the HTTP API of the gecko service
(default: ``)
10 changes: 5 additions & 5 deletions docs/docusaurus.config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import type * as Preset from "@docusaurus/preset-classic";
import type { Config } from "@docusaurus/types";
import { themes } from "prism-react-renderer";

const url = new URL("https://radio-aktywne.github.io/webrecords");
const url = new URL("https://radio-aktywne.github.io/magnolia");

const config: Config = {
title: "webrecords docs",
title: "magnolia docs",
favicon: "favicon.svg?v=1",

url: `${url.protocol}//${url.host}`,
Expand Down Expand Up @@ -41,14 +41,14 @@ const config: Config = {

themeConfig: {
navbar: {
title: "webrecords docs",
title: "magnolia docs",
logo: {
alt: "webrecords docs logo",
alt: "magnolia docs logo",
src: "logo.svg?v=1",
},
items: [
{
href: "https://github.com/radio-aktywne/webrecords",
href: "https://github.com/radio-aktywne/magnolia",
position: "right",
className: "header-github-link",
"aria-label": "GitHub repository",
Expand Down
2 changes: 1 addition & 1 deletion openapi/emishows.yaml → openapi/beaver.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
info:
title: emishows app
title: beaver
openapi: 3.1.0
paths:
/events:
Expand Down
2 changes: 1 addition & 1 deletion openapi/emirecords.yaml → openapi/gecko.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
info:
title: emirecords app
title: gecko
openapi: 3.1.0
paths:
/ping:
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

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

12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"name": "webrecords",
"name": "magnolia",
"private": true,
"scripts": {
"dev": "next dev --hostname \"${WEBRECORDS__SERVER__HOST:-0.0.0.0}\" --port \"${WEBRECORDS__SERVER__PORT:-38000}\"",
"run": "next start --hostname \"${WEBRECORDS__SERVER__HOST:-0.0.0.0}\" --port \"${WEBRECORDS__SERVER__PORT:-38000}\"",
"dev": "next dev --hostname \"${MAGNOLIA__SERVER__HOST:-0.0.0.0}\" --port \"${MAGNOLIA__SERVER__PORT:-38000}\"",
"run": "next start --hostname \"${MAGNOLIA__SERVER__HOST:-0.0.0.0}\" --port \"${MAGNOLIA__SERVER__PORT:-38000}\"",
"build": "next build",
"clean": "rm --recursive --force build/",
"update": "ncu --peer --upgrade && npm i --no-audit --no-fund",
"generate-api-emirecords": "openapi-typescript openapi/emirecords.yaml -o src/api/emirecords/types.d.ts",
"generate-api-emishows": "openapi-typescript openapi/emishows.yaml -o src/api/emishows/types.d.ts",
"generate-api": "npm run -- generate-api-emirecords && npm run -- generate-api-emishows"
"generate-api-beaver": "openapi-typescript openapi/beaver.yaml -o src/api/beaver/types.d.ts",
"generate-api-gecko": "openapi-typescript openapi/gecko.yaml -o src/api/gecko/types.d.ts",
"generate-api": "npm run -- generate-api-beaver && npm run -- generate-api-gecko"
},
"dependencies": {
"@mantine/core": "^7.7.1",
Expand Down
13 changes: 5 additions & 8 deletions src/actions/deleteRecord/action.ts
Original file line number Diff line number Diff line change
@@ -1,20 +1,17 @@
"use server";

import { emirecords } from "../../api";
import { gecko } from "../../api";
import { DeleteRecordProps } from "./types";

const errorMessage = "Deleting recprd failed.";

export async function deleteRecord({ event, start }: DeleteRecordProps) {
try {
const { error, response } = await emirecords.DELETE(
"/records/{event}/{start}",
{
params: {
path: { event, start },
},
const { error, response } = await gecko.DELETE("/records/{event}/{start}", {
params: {
path: { event, start },
},
);
});

return { error: error || !response.ok ? errorMessage : undefined };
} catch (error) {
Expand Down
4 changes: 2 additions & 2 deletions src/actions/getEvent/action.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
"use server";

import { emishows } from "../../api";
import { beaver } from "../../api";
import { GetEventData, GetEventProps } from "./types";

const errorMessage = "Getting event failed.";

export async function getEvent({ id, include }: GetEventProps) {
try {
const { data, error, response } = await emishows.GET("/events/{id}", {
const { data, error, response } = await beaver.GET("/events/{id}", {
params: {
path: { id },
query: { include },
Expand Down
2 changes: 1 addition & 1 deletion src/actions/getEvent/types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { components } from "../../api/emishows";
import { components } from "../../api/beaver";

export type GetEventData = components["schemas"]["events_models_Event"];

Expand Down
4 changes: 2 additions & 2 deletions src/actions/listEvents/action.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use server";

import { emishows } from "../../api";
import { beaver } from "../../api";
import { ListEventsData, ListEventsProps } from "./types";

const errorMessage = "Listing events failed.";
Expand All @@ -14,7 +14,7 @@ export async function listEvents({
order,
}: ListEventsProps = {}) {
try {
const { data, error, response } = await emishows.GET("/events", {
const { data, error, response } = await beaver.GET("/events", {
params: {
query: { limit, offset, where, query, include, order },
},
Expand Down
2 changes: 1 addition & 1 deletion src/actions/listEvents/types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { components } from "../../api/emishows";
import { components } from "../../api/beaver";

export type ListEventsData = components["schemas"]["EventList"];

Expand Down
4 changes: 2 additions & 2 deletions src/actions/listRecords/action.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use server";

import { emirecords } from "../../api";
import { gecko } from "../../api";
import { ListRecordsData, ListRecordsProps } from "./types";

const errorMessage = "Listing records failed.";
Expand All @@ -14,7 +14,7 @@ export async function listRecords({
order,
}: ListRecordsProps) {
try {
const { data, error, response } = await emirecords.GET("/records/{event}", {
const { data, error, response } = await gecko.GET("/records/{event}", {
params: {
path: { event },
query: { after, before, limit, offset, order },
Expand Down
2 changes: 1 addition & 1 deletion src/actions/listRecords/types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { components } from "../../api/emirecords";
import { components } from "../../api/gecko";

export type ListRecordsData = components["schemas"]["RecordList"];

Expand Down
Loading

0 comments on commit 4c30abc

Please sign in to comment.