-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit d4d6f0d
Showing
160 changed files
with
12,569 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
.gradle | ||
.idea | ||
**/build/** | ||
/qbittorrent/ | ||
!/server/build/install/ | ||
!/client-web/build/distributions/ | ||
!/client-web-old/build/distributions/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
* text=auto eol=lf | ||
Dockerfile eol=lf | ||
*.sh eol=lf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
github: [ drewcarlson ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
.gradle/ | ||
/.idea | ||
!/.idea/codeStyles | ||
out/ | ||
build/ | ||
.env | ||
*.iml | ||
*.ipr | ||
*.iws | ||
.DS_Store | ||
qbittorrent/ | ||
local.properties |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
FROM openjdk:13-alpine | ||
|
||
COPY . /build-project | ||
WORKDIR /build-project | ||
RUN ./gradlew installShadowDist browserProductionWebpack --no-daemon | ||
|
||
FROM openjdk:13-alpine | ||
RUN apk add --update \ | ||
bash \ | ||
ffmpeg \ | ||
&& rm -rf /var/cache/apk/* | ||
WORKDIR /app | ||
COPY --from=0 /build-project/server/build/install ./install | ||
COPY --from=0 /build-project/client-web/build/distributions ./client-web | ||
ENTRYPOINT ["./install/server-shadow/bin/server"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
FROM openjdk:13-alpine | ||
RUN apk add --update \ | ||
bash \ | ||
ffmpeg \ | ||
&& rm -rf /var/cache/apk/* | ||
WORKDIR /app | ||
COPY server/build/install ./install | ||
COPY client-web/build/distributions ./client-web | ||
ENTRYPOINT ["./install/server-shadow/bin/server"] |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
AnyStream | ||
=== | ||
|
||
 | ||
 | ||
|
||
A self-hosted streaming service for your media collection. | ||
|
||
### Features | ||
|
||
- Track and organize your existing media library | ||
- Stream to all your favorite devices | ||
- Share your library with fine-grained permissions | ||
|
||
<details> | ||
<summary>Screenshots</summary> | ||
|
||
 | ||
 | ||
|
||
</details> | ||
|
||
### Structure | ||
|
||
AnyStream consists of a self-hosted server instance and various client applications that connect to it. | ||
|
||
- [server](server) - Web server for managing and streaming media built with [Ktor](https://github.com/ktorio/ktor) | ||
- [client](client) - Multiplatform infrastructure for AnyStream client applications built with [Mobius.kt](https://github.com/DrewCarlson/mobius.kt) | ||
- [client-android](client-android) - Android client implementation built with [Jetpack Compose](https://developer.android.com/jetpack/compose) | ||
- [client-web](client-web) - Web client implementation built with [Jetbrains Compose](https://github.com/JetBrains/compose-jb/) | ||
- [data-models](data-models) - Data models shared between the server and clients | ||
- [api-client](api-client) - Multiplatform API client for interacting with the server built with [Ktor-client](https://github.com/ktorio/ktor) | ||
|
||
### Development | ||
|
||
*Note: Because of the use of Jetpack Compose, only [Android Studio 2020.3.1 Arctic Fox](https://developer.android.com/studio/preview) is supported!* | ||
|
||
- Install [Intellij IDEA](https://www.jetbrains.com/idea/) (preferred) or [Android Studio](https://developer.android.com/studio/) | ||
- Clone this repo `git clone https://github.com/DrewCarlson/AnyStream.git` | ||
- Open the `AnyStream` folder in your IDE | ||
|
||
### Run locally | ||
|
||
1. Build server `./gradlew installShadowDist` | ||
|
||
2. Build client-web `./gradlew jsBrowserReleaseExecutableDistribution` | ||
|
||
3. Start docker stack `docker-compose up -d` | ||
|
||
The following services will be running: | ||
|
||
- anystream (app): http://localhost:8888 | ||
- mongo: localhost:27017 | ||
- mongo-express: http://localhost:8081 | ||
- docker-qbittorrentvpn: http://localhost:9090 | ||
|
||
|
||
### Web Client Development | ||
|
||
1. _(Follow Run Locally)_ | ||
|
||
2. Run the client-web webpack dev server: `./gradlew -t jsBrowserRun` | ||
|
||
The web client with live-reload is served from http://localhost:3000. | ||
Webpack's dev server proxies API requests to `localhost:8888`. | ||
|
||
|
||
### Server Development | ||
|
||
1. _(Follow Run Locally)_ | ||
|
||
2. Stop the AnyStream container: `docker-compose stop app` | ||
|
||
3. Run the server: `./gradlew -t run` | ||
|
||
|
||
### Other useful tasks | ||
|
||
Build server bundle into `server/build/install/server-shadow`: | ||
```bash | ||
./gradlew installShadowDist | ||
``` | ||
|
||
Build production client-web source into `client-web/build/distributions`: | ||
```bash | ||
./gradlew jsBrowserDistribution | ||
``` | ||
|
||
### License | ||
|
||
This project is licensed under AGPL-3.0, found in [LICENSE](LICENSE). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
plugins { | ||
kotlin("multiplatform") | ||
kotlin("plugin.serialization") | ||
} | ||
|
||
kotlin { | ||
jvm() | ||
js(IR) { | ||
browser { | ||
testTask { | ||
useKarma { | ||
useChromeHeadless() | ||
} | ||
} | ||
} | ||
} | ||
|
||
sourceSets { | ||
all { | ||
languageSettings.apply { | ||
useExperimentalAnnotation("kotlinx.coroutines.ExperimentalCoroutinesApi") | ||
useExperimentalAnnotation("kotlinx.coroutines.FlowPreview") | ||
} | ||
} | ||
val commonMain by getting { | ||
kotlin.srcDirs("src") | ||
dependencies { | ||
implementation(projects.dataModels) | ||
implementation(libs.coroutines.core) | ||
implementation(libs.serialization.core) | ||
implementation(libs.serialization.json) | ||
|
||
implementation(libs.ktor.client.core) | ||
implementation(libs.ktor.client.json) | ||
implementation(libs.ktor.client.serialization) | ||
implementation(libs.korio) | ||
} | ||
} | ||
val commonTest by getting { | ||
kotlin.srcDirs("test") | ||
dependencies { | ||
implementation(kotlin("test-common")) | ||
implementation(kotlin("test-annotations-common")) | ||
} | ||
} | ||
|
||
val jvmMain by getting { | ||
dependencies { | ||
implementation(project(":data-models")) | ||
implementation(libs.ktor.client.okhttp) | ||
} | ||
} | ||
|
||
val jvmTest by getting { | ||
kotlin.srcDirs("testJvm") | ||
dependencies { | ||
implementation(kotlin("test")) | ||
implementation(kotlin("test-junit")) | ||
} | ||
} | ||
|
||
val jsMain by getting { | ||
dependencies { | ||
implementation(project(":data-models")) | ||
implementation(libs.ktor.client.js) | ||
} | ||
} | ||
|
||
val jsTest by getting { | ||
kotlin.srcDirs("testJs") | ||
dependencies { | ||
implementation(kotlin("test-js")) | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.