Skip to content

Commit 59d78bd

Browse files
Merge branch 'dev'
2 parents 1c572c5 + 17511a5 commit 59d78bd

58 files changed

Lines changed: 2007 additions & 352 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/dependabot.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ updates:
99
directory: "/taletime" # Location of package manifests
1010
schedule:
1111
interval: "weekly"
12+
open-pull-requests-limit: 15

.github/workflows/release-merge-version.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ jobs:
2020
with:
2121
fetch-depth: 0
2222
ref: "dev"
23+
- name: 📦 Setup Java
24+
uses: actions/setup-java@v2
25+
with:
26+
distribution: 'adopt'
27+
java-version: '17'
2328
- name: ⚙️ Setup Flutter
2429
uses: subosito/flutter-action@v2
2530
with:

.vscode/launch.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,23 @@
99
"cwd": "taletime",
1010
"request": "launch",
1111
"type": "dart",
12-
"args": ["--flavor", "dev", ]
12+
"args": ["--flavor", "dev" ]
1313
},
1414
{
1515
"name": "taletime (profile mode)",
1616
"cwd": "taletime",
1717
"request": "launch",
1818
"type": "dart",
19-
"flutterMode": "profile"
19+
"flutterMode": "profile",
20+
"args": ["--flavor", "dev" ]
2021
},
2122
{
2223
"name": "taletime (release mode)",
2324
"cwd": "taletime",
2425
"request": "launch",
2526
"type": "dart",
26-
"flutterMode": "release"
27+
"flutterMode": "release",
28+
"args": ["--flavor", "dev" ]
2729
}
2830
]
2931
}

README.md

Lines changed: 280 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,280 @@
1+
# TaleTime
2+
3+
Children may discover a novel way to listen to audiobooks with the help of the revolutionary Android and iOS software TaleTime.
4+
5+
In addition to offering parents the chance to record the stories themselves, we also provide professionally recorded audiobooks. Recording is incredibly practical and, naturally, is something that anyone with a little understanding of technology can perform. Children at TaleTime can also decide how the stories will develop on their own.
6+
7+
<!-- <div class="d-lg-none">
8+
<p class="lead">
9+
<a href="app">Test out our online demo!</a>
10+
</p>
11+
</div> -->
12+
*[Test out our online demo](https://taletime-2022.web.app/#/)*
13+
14+
## Write a new Story
15+
16+
TaleTime depends on authors producing new works! The information below is for you if you want to help grow the application.
17+
18+
To become a taletime story-teller, all you need is to register an account, create a 'story-teller' profile and start recording as many stories as you wish.
19+
20+
21+
## Contributing
22+
23+
Everyone may contribute to improving TaleTime as it is an open source project.
24+
The entire source code is available on [GitHub](https://github.com/TaleTime/TaleTime_2/tree/main/taletime), where you can also learn more about contributing.
25+
26+
Please ensure that your code adheres to the same style as the existing codebase whether adding a new feature or resolving a problem, and make an effort to write your code as simply as you can.
27+
Additionally, test your modifications before committing them, and only do so if they don't damage anything.
28+
You must use English for commenting.
29+
30+
## Installation
31+
32+
### Flutter
33+
34+
Download current [Flutter Version](https://docs.flutter.dev/get-started/install) and follow the installation guide for your OS.
35+
Here you will install Flutter and Android Studio, you will update your path Variable to use commands more easily inside the shell and configure your Android Emulator.
36+
The process is well documented and the command "flutter doctor" helps you find and solve any problems you might encounter.
37+
38+
#### Disclaimer
39+
40+
During installation on Windows it might be necessary to update the included dart, use "flutter pub upgrade --major-versions" if needed.
41+
For any other encountered error you can use [Google](https://www.google.de/), the Flutter community is very active and helpful.
42+
43+
### IDE
44+
45+
#### Android Studio
46+
47+
We recommend using [Android Studio](https://developer.android.com/studio) because it is an integrated development environment for Android projects.
48+
It comes with all tools required for developing and configuring your emulators.
49+
50+
While already being configured for Android projects, the IDE is still missing support for Flutter.
51+
This can easily be added by installing the [Flutter Plugin] (https://plugins.jetbrains.com/plugin/9212-flutter).
52+
You can also add the [Flutter Intl Plugin](https://plugins.jetbrains.com/plugin/13666-flutter-intl).
53+
54+
In order to open the project properly, import only the `taletime/` folder into Android Studio.
55+
Otherwise the IDE might not correctly detect the flutter project.
56+
57+
#### Visual Studio Code
58+
59+
An alternative to Android Studio is [Visual Studio Code](https://code.visualstudio.com/).
60+
It is a lightweight IDE which can be customized to your needs.
61+
In addition to that the project is already configured to it and offers a few benefits.
62+
63+
##### Recommended Plugins
64+
###### Code Spell Checker: streetsidesoftware.code-spell-checker
65+
Offers spellchecking for English, other language packages can be downloaded aswell
66+
###### Markdown All in One: yzhang.markdown-all-in-one
67+
All in one Markdown solution
68+
###### Flutter: Dart-Code.flutter
69+
Flutter Extension with Dart
70+
###### Flutter Intl: localizely.flutter-intl
71+
Flutter localization binding from .arb files with official Intl library
72+
###### Gradle for Java: vscjava.vscode-gradle
73+
Manage Gradle Projects, run Gradle tasks and provide better Gradle file authoring experience in VS Code
74+
###### vscode-commandbar: gsppvo.vscode-commandbar
75+
Visual Studio Code Command bar
76+
###### Git Graph: mhutchie.git-graph
77+
View a Git Graph of your repository, and perform Git actions from the graph.
78+
###### GitLens - Git supercharged: eamodio.gitlens
79+
Supercharge Git within VS Code — Visualize code authorship at a glance via Git blame annotations and CodeLens, seamlessly navigate and explore Git repositories, gain valuable insights via rich visualizations and powerful comparison commands, and so much more.
80+
81+
#### Selecting flavor
82+
83+
The app can be build in three different "variants".
84+
These variants are called flavors.
85+
Each flavor has a different app ID, so that they can be installed in parallel on each device.
86+
These flavors are:
87+
88+
- `dev`: for local development. This is the flavor you should select for working on the app. App ID: `de.htwsaar.taletime.dev`
89+
- `staging`: for testing new features. Only used by pipelines inside GitHub Actions. App ID: `de.htwsaar.taletime.staging`
90+
- `prod`: Productive version. Ony built by GitHub Actions. App ID: `de.htwsaar.taletime`
91+
92+
As already mentioned, the only flavor you should use is `dev`.
93+
You need to set this flavor in your run configuration.
94+
On Android studio, this can be done under Edit run configurations:
95+
96+
![Run Configuration](doc/img/RunConfigFlavor.png)
97+
98+
When running via command line, specify the `--flavor` option:
99+
100+
```bash
101+
# Run app
102+
flutter run --flavor dev
103+
104+
# Build APK
105+
flutter build apk --flavor dev
106+
```
107+
108+
## Developing
109+
110+
Always open the "taletime" folder inside your IDE to make sure all cmds are working
111+
112+
### Internationalization
113+
114+
All messages visible to the user must be translated.
115+
116+
1. Add a new variable to all internationalization files (app_en.arb,...).
117+
Be sure to prefix translation which are only used on one side with the class name in CamelCase, this ensures at least some clearness in the internationalization files.
118+
119+
Example: `"pageClass_pageTitle":"Title of or Page"`,
120+
2. Run `flutter gen-l10n` to update your internationalization files.
121+
VsCode is configured to automatically update internationalization files on save.
122+
In VsCode you can use the commandbar button "Update l10n" manually.
123+
3. Call `AppLocalizations.of(context)!.\<your_variable_name>` inside your class.
124+
It will automatically add `import 'internationalization/localizations_ext.dart';`.
125+
The `!` is needed to tell flutter that the variable won't be null.
126+
127+
Example: AppLocalizations.of(context)!.pageClass_pageTitle
128+
129+
## Current Features
130+
131+
### Login and Registration
132+
133+
- Create a new account
134+
- Login to your account
135+
- Reset password
136+
137+
### Profiles
138+
139+
- Create profiles
140+
- Edit profiles
141+
- Delete profiles
142+
143+
### Listener
144+
145+
- Search stories
146+
- Listen to stories
147+
- Add stories to favorites
148+
149+
### Storyteller
150+
151+
- Record a story
152+
- Play your recorded story
153+
- Upload / save your recorded story
154+
155+
### Settings
156+
157+
- Change language (English / German)
158+
- Light and dark mode
159+
- Change password
160+
161+
## Development workflow
162+
163+
To work efficiently in a software project, there are some rules you should follow:
164+
165+
### Branches
166+
167+
There are two central branches in the project.
168+
169+
- `main`: This branch contains the stable code that is used by the productive release.
170+
DO NOT commit to this branch or merge any changes into it.
171+
It is maintained by the [dedicated workflow](#automatic-creation-of-releases).
172+
- `dev`: This branch is set to be the default branch of the repository.
173+
It contains the latest code that can be included in the next release.
174+
DO NOT commit to this branch directly. ONLY merge pull requests into this branch.
175+
176+
### Workflow
177+
178+
To develop a new feature or fix a bug follow these steps:
179+
180+
1. Create a new branch from the `dev` branch.
181+
You should name it properly, starting with `fix/` or `feature/` followed by a short but meaningful description of what you do.
182+
2. Develop your feature or fix. Commit your code often, but not too often to that branch.
183+
Write a meaningful commit message. It is important that you follow [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/)
184+
This is important for automatically figuring out the next version number.
185+
Valid change types are `chore`, `fix`, `feat`, `BREAKING CHANGE`.
186+
3. When you are done, open a pull request.
187+
This pull request should target the `dev` branch again.
188+
Remember to write a concise description of what you have done.
189+
4. Request a review of at least one of your team members.
190+
5. Your colleague reviews your changes and gives feedback.
191+
He or she can approve your code or request changes.
192+
6. There is a workflow that also runs tests and let you know if there are problems during compilation.
193+
7. If your code was approved, you can merge the pull request.
194+
If changes were requested, fix them and go back to step 4.
195+
196+
After a few features, you can create a new release of the app.
197+
See [Automatic creation of releases](#automatic-creation-of-releases).
198+
199+
DO NOT edit the version number of the app by hand.
200+
It is maintained automatically.
201+
202+
### Issues
203+
204+
Use GitHub Issues to keep track of bugs you encounter or new features you want to implement.
205+
206+
There are templates for bug reports and feature requests.
207+
When creating a new issue you can select the appropriate type.
208+
Fill out the form and include all relevant information.
209+
This helps to remember all relevant aspects and keep a consistent format.
210+
211+
If you open a pull request that resolves an issue, include a reference in its description.
212+
You can do so by typing `closes #123` where 123 needs to be replaced by the actual number of the issue.
213+
When merging this pull request, this issue will automatically closed.
214+
215+
### Dependabot
216+
217+
Dependabot is software from GitHub that checks your code for newer versions of dependencies.
218+
If it finds something that needs to be updated, it will create a pull request to apply that newer version.
219+
In our configuration, it will run its checks weakly.
220+
If there are pull requests from dependabot, wait for the status checks to pass, and then merge the pull request.
221+
222+
After merging changes, dependabot recognises this and rebases itself to include the latest changes.
223+
This is indicated by yellow warning signs in the description.
224+
DO NOT touch this pull request while these warning signs are shown.
225+
226+
Don't panic, you do not need to know or change anything about dependabot.
227+
Just profit from its work and merge its pull requests from time to time.
228+
229+
## Workflows
230+
231+
This project takes leverage of GitHub Actions for Continuous Integration and Continuous Deployment.
232+
There are different workflows that complete different tasks.
233+
234+
Don't panic, the workflows are already set up and working.
235+
You do have to know anything about the inner workings of them.
236+
Just profit from what is is already there.
237+
238+
### Automated testing
239+
240+
Whenever a developer opens a pull request, the code is automatically tested and built to find possible bugs as soon as possible.
241+
Those commit massages get a little icon in GitHub pull request screens depending on the outcome of the tests.
242+
This can be a green checkmark if all tests succeed.
243+
If there was a problem, this will be a red cross.
244+
As long as the tests are still in progress, a yellow circle will be shown.
245+
246+
Clicking on that icon brings you to the logs of this pipeline.
247+
In case there is an error you can see the details to be able to understand the problem.
248+
249+
Each test run also builds a staging version of the app.
250+
This allows for quick installation and other team members can test you newly added features.
251+
252+
### Automatic creation of releases
253+
254+
The app is released using the GitHub release system.
255+
After adding relevant features or bug fixes a new release should be created.
256+
Releases do not need to be crafted by hand, there is a workflow for it!
257+
258+
To release the app, you only need to navigate to [GitHub Actions](https://github.com/TaleTime/TaleTime_2/actions/workflows/release-merge-version.yaml) and run the workflow.
259+
For that, click the "Run workflow"-Dropdown, select `dev` as the branch and hit "Run workflow".
260+
261+
![Release workflow dispatch](doc/img/ReleaseWorkflowDispatch.png)
262+
263+
This workflow will increase the version number according to semantic versioning and merge the dev branch into the main branch.
264+
After that, a new release is created using the commit on the main branch.
265+
The release notes are generated automatically from the merged pull requests since the last release.
266+
After that a new development version is created on the dev branch.
267+
268+
So DO NOT create releases manually, use the dedicated workflow!
269+
270+
### Assigning labels to pull requests
271+
272+
Each pull request is assigned labels depending on the type of change that it applies.
273+
Every time a pull request is updated, a workflow will assign labels accordingly.
274+
275+
It is very important for this workflow that you use conventional commits.
276+
277+
## About us
278+
279+
This project is in active development by several students of [Hochschule für Technik und Wirtschaft des Saarlandes](http://www.htwsaar.de).
280+
28.7 KB
Loading

doc/img/RunConfigFlavor.png

62.4 KB
Loading

taletime/.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,4 +244,6 @@ google-services.json
244244
.flutter-plugins-dependencies
245245

246246
# Untranslated messages land in here
247-
untranslated.txt
247+
untranslated.txt
248+
249+
.firebase/

taletime/.vscode/launch.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,22 @@
77
{
88
"name": "taletime",
99
"request": "launch",
10-
"type": "dart"
10+
"type": "dart",
11+
"args": ["--flavor", "dev" ]
1112
},
1213
{
1314
"name": "taletime (profile mode)",
1415
"request": "launch",
1516
"type": "dart",
16-
"flutterMode": "profile"
17+
"flutterMode": "profile",
18+
"args": ["--flavor", "dev" ]
1719
},
1820
{
1921
"name": "taletime (release mode)",
2022
"request": "launch",
2123
"type": "dart",
22-
"flutterMode": "release"
24+
"flutterMode": "release",
25+
"args": ["--flavor", "dev" ]
2326
}
2427
]
2528
}

taletime/.vscode/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"dart.hotReloadOnSave": "manualIfDirty",
55
"editor.formatOnSave": true,
66
"editor.codeActionsOnSave": {
7-
"source.fixAll": true
7+
"source.fixAll": "explicit"
88
},
99
"dart.lineLength": 100,
1010
"[dart]": {

0 commit comments

Comments
 (0)