Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

angular 17 PWA, Firestore, Material, user-data on localStorage #16

Open
wants to merge 55 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
606bfc8
init angular 17
ortwic Feb 15, 2024
00b356b
implement blog from firebase
ortwic Feb 16, 2024
8f36e31
init pwa + icons
ortwic Feb 20, 2024
a3947f1
added error page
ortwic Feb 21, 2024
6a32654
init ng material
ortwic Feb 22, 2024
20d1da1
Merge pull request #1 from ortwic/features/angular
ortwic Feb 22, 2024
61e6ce1
fixed iframe src and styles
ortwic Mar 14, 2024
b7b6088
added dev-spa config for performant development
ortwic Mar 20, 2024
8bc6f11
guide overview for start page
ortwic Mar 20, 2024
2db76c4
updated navigation + sticky toolbar
ortwic Mar 21, 2024
6f534f6
up angular 17.3.1
ortwic Mar 21, 2024
c5bf82e
check-built-on-pull-request.yml on push
ortwic Mar 22, 2024
1f4c8ef
fixed ng build infinite loop due to firestore query stream
ortwic Mar 22, 2024
705b3b3
moved routes to pages folder
ortwic Mar 22, 2024
bc66ea1
step through pages
ortwic Mar 22, 2024
e24bd2b
render markdown
ortwic Mar 22, 2024
0ed0975
keen-slider for image slider component
ortwic Mar 23, 2024
f35a901
added form stepper component for textarea + select
ortwic Mar 24, 2024
d4ab7c6
separated form-stepper to stepper + input-section
ortwic Mar 25, 2024
7a11010
custom marked-media support
ortwic Mar 25, 2024
1d2b538
set document titles
ortwic Mar 25, 2024
28ea52b
custom marked-media blockquote
ortwic Mar 25, 2024
fe30710
added loading component
ortwic Mar 25, 2024
ff7949c
added page stepping
ortwic Mar 25, 2024
7f63f72
reuse progress-spinner on start page
ortwic Mar 26, 2024
8ed6f37
use firestore offline cache
ortwic Mar 26, 2024
045b768
input-section data binding
ortwic Mar 26, 2024
d8e214d
perist user-data for input-sections
ortwic Mar 27, 2024
cad2095
fixed tests
ortwic Mar 27, 2024
1419348
fixed appending page to user-data
ortwic Mar 27, 2024
cf96c0c
compute user-progress for start page
ortwic Mar 27, 2024
b9bb386
get navigation from firestore
ortwic Mar 27, 2024
b9631c0
get resources (common service) from firestore
ortwic Mar 28, 2024
a2d362d
check min read time before page complete
ortwic Mar 28, 2024
e8411a5
Pure SPA: disabled prerender + ssr to fix firestore caching
ortwic Apr 4, 2024
cbacbce
added summary page
ortwic Apr 5, 2024
682d0f7
resolve img url from firestore storage
ortwic Apr 5, 2024
6206b78
resolve path of blog images
ortwic Apr 6, 2024
0706ad1
get privacy and imprint from firestore pages
ortwic Apr 6, 2024
5f2d33b
replaced page.slug with page.id
ortwic Apr 6, 2024
dc37a1f
fixed embedded iframe
ortwic Apr 7, 2024
9d73b1a
added components expand and iframe
ortwic Apr 7, 2024
2c590c7
sort by sticky blogposts
ortwic Apr 11, 2024
7df91c2
renamed guide to units
ortwic Apr 13, 2024
f923e9c
get page info from guide.service
ortwic Apr 14, 2024
b723f3c
added terms-of-use.guard and save user data by storage key
ortwic Apr 18, 2024
57b242f
markdown component fixes anchor navigation
ortwic Apr 18, 2024
8d4e43d
added input validation
ortwic Apr 19, 2024
b495474
fixed load default data
ortwic Apr 19, 2024
1c53f73
fixed links in blog posts
ortwic May 10, 2024
a69e6d8
donate button
ortwic May 10, 2024
8f80fef
refactored service-structure; added page-facade.service
ortwic May 12, 2024
6aafb02
refactored and fixed user-data.service; new data structure
ortwic May 12, 2024
28e2100
introducing ngxtension; replaced observables with signals
ortwic May 12, 2024
0815fab
migrated input, output, model to signals
ortwic May 13, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Editor configuration, see https://editorconfig.org
root = true

[*]
charset = utf-8
indent_style = space
indent_size = 4
insert_final_newline = true
trim_trailing_whitespace = true
max_line_length = 120

[*.ts]
quote_type = single

[*.md]
max_line_length = off
trim_trailing_whitespace = false
2 changes: 1 addition & 1 deletion .firebaserc
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@
}
},
"etags": {}
}
}
9 changes: 7 additions & 2 deletions .github/workflows/check-built-on-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@
# https://github.com/firebase/firebase-tools

name: Check if project builds
'on': pull_request
on:
pull_request:
push:
branches:
- main
- develop
jobs:
build_and_preview:
if: '${{ github.event.pull_request.head.repo.full_name == github.repository }}'
Expand All @@ -14,5 +19,5 @@ jobs:
run: |
npm i -g pnpm
pnpm install
pnpm test:unit
pnpm test
pnpm build
172 changes: 53 additions & 119 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,130 +1,64 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
# See http://help.github.com/ignore-files/ for more about ignoring files.

# Compiled output
/dist
/tmp
/out-tsc
/bazel-out

# Node
/node_modules
*/node_modules
npm-debug.log
yarn-error.log
.pnpm-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
# IDEs and editors
.idea/
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace

# Visual Studio Code
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
.history/*

# Miscellaneous
*.log
/.angular/cache
.sass-cache/
/connect.lock
/coverage
/libpeerconnection.log
testem.log
/typings

# System files
.DS_Store
Thumbs.db

# Firebase cache
.firebase/

# Firebase config

# Runtime data
pids
*.pid
*.seed
*.pid.lock
# Uncomment this if you'd like others to create their own Firebase project.
# For a team working on the same Firebase project(s), it is recommended to leave
# it commented so all members can deploy to the same project(s) in .firebaserc.
# .firebaserc

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Snowpack dependency directory (https://snowpack.dev/)
web_modules/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional stylelint cache
.stylelintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variable files
# dotenv environment variables file
.env
.env.development.local
.env.test.local
.env.production.local
.env.local

# parcel-bundler cache (https://parceljs.org/)
.cache
.parcel-cache

# Next.js build output
.next
out

# Nuxt.js build / generate output
.nuxt
dist

# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and not Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public

# vuepress build output
.vuepress/dist

# vuepress v2.x temp and cache directory
.temp
.cache

# Docusaurus cache and generated files
.docusaurus

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# TernJS port file
.tern-port

# Stores VSCode versions used for testing VSCode extensions
.vscode-test

# yarn v2
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*
4 changes: 4 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=827846
"recommendations": ["angular.ng-template"]
}
20 changes: 20 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "ng serve",
"type": "chrome",
"request": "launch",
"preLaunchTask": "npm: start",
"url": "http://localhost:4200/"
},
{
"name": "ng test",
"type": "chrome",
"request": "launch",
"preLaunchTask": "npm: test",
"url": "http://localhost:9876/debug.html"
}
]
}
42 changes: 42 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
// For more information, visit: https://go.microsoft.com/fwlink/?LinkId=733558
"version": "2.0.0",
"tasks": [
{
"type": "npm",
"script": "start",
"isBackground": true,
"problemMatcher": {
"owner": "typescript",
"pattern": "$tsc",
"background": {
"activeOnStart": true,
"beginsPattern": {
"regexp": "(.*?)"
},
"endsPattern": {
"regexp": "bundle generation complete"
}
}
}
},
{
"type": "npm",
"script": "test",
"isBackground": true,
"problemMatcher": {
"owner": "typescript",
"pattern": "$tsc",
"background": {
"activeOnStart": true,
"beginsPattern": {
"regexp": "(.*?)"
},
"endsPattern": {
"regexp": "bundle generation complete"
}
}
}
}
]
}
70 changes: 62 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,51 @@
# Why-App
A philosophical tool for your existential journey.

## Getting Started
# Content Management

### Prerequisites
## Creating Content

Content is managed with [FireCMS](https://app.firecms.co/p/why-app-8a640).

There are 3 collections for content:
- Guide
- Page
- Blog

Each guide can reference to n pages.

## Formatting Content

Markdown is supported where as it's extended to support img size, audio and embeded youtube videos. You can use it like this:

### Example image
```javascript
marked.parseInline("![](http://example.com/media/1.jpg 'style=width:300px,title=test img')")
```
generates:
```<img src='http://example.com/media/1.jpg' style='width=300px' title='test img'></img>```

### Example audio
```javascript
marked.parseInline("![this is audio](1.wav 'type=wav,controls,autoplay,muted')")
```
generates:
```<audio alt='this is audio' controls><source src='1.wav' type='audio/wav'></audio>```

### Example 3
```javascript
marked.parseInline("![](PB4gId2mPNc 'type=youtube,width=560,height=315,allow=accelerometer;autoplay;clipboard-write,allowfullscreen')");
```
generates:
```<iframe width='560' height='315' src='https://www.youtube.com/embed/PB4gId2mPNc' title='YouTube video player' frameborder='0' allow='accelerometer;autoplay;clipboard-write;' allowfullscreen></iframe>```

# Getting Started

## Prerequisites

You should install [nodejs](https://nodejs.org) and [pnpm](https://pnpm.io). I'd recommend [Visual Studio Code](https://code.visualstudio.com) for developing.

### Installation
## Installation

_Below is an example of how you can instruct your audience on installing and setting up your app. This template doesn't rely on any external dependencies or services._

Expand All @@ -21,14 +59,30 @@ _Below is an example of how you can instruct your audience on installing and set
```sh
pnpm install
```
3. Start app in debug mode
```js
pnpm dev
```

## Development server

Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The application will automatically reload if you change any of the source files.

## Code scaffolding

Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.

## Build

Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory.

## Running unit tests

Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).

## Running end-to-end tests

Run `ng e2e` to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities.

<p align="right">(<a href="#readme-top">back to top</a>)</p>

## Contributing
# Contributing

Really? This project is very small yet. Contact me if you really desire...

Expand Down
Loading
Loading