Skip to content

Commit 1aa891d

Browse files
committed
feat: initialize project to test universal link
0 parents  commit 1aa891d

File tree

8 files changed

+213
-0
lines changed

8 files changed

+213
-0
lines changed

.firebaserc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"projects": {
3+
"default": "project2-f5cb2"
4+
}
5+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# This file was auto-generated by the Firebase CLI
2+
# https://github.com/firebase/firebase-tools
3+
4+
name: Deploy to Firebase Hosting on merge
5+
on:
6+
push:
7+
branches:
8+
- main
9+
jobs:
10+
build_and_deploy:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
- run: npm ci && npm run build
15+
- uses: FirebaseExtended/action-hosting-deploy@v0
16+
with:
17+
repoToken: ${{ secrets.GITHUB_TOKEN }}
18+
firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_PROJECT2_F5CB2 }}
19+
channelId: live
20+
projectId: project2-f5cb2
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# This file was auto-generated by the Firebase CLI
2+
# https://github.com/firebase/firebase-tools
3+
4+
name: Deploy to Firebase Hosting on PR
5+
on: pull_request
6+
permissions:
7+
checks: write
8+
contents: read
9+
pull-requests: write
10+
jobs:
11+
build_and_preview:
12+
if: ${{ github.event.pull_request.head.repo.full_name == github.repository }}
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
- run: npm ci && npm run build
17+
- uses: FirebaseExtended/action-hosting-deploy@v0
18+
with:
19+
repoToken: ${{ secrets.GITHUB_TOKEN }}
20+
firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_PROJECT2_F5CB2 }}
21+
projectId: project2-f5cb2

.gitignore

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
firebase-debug.log*
8+
firebase-debug.*.log*
9+
10+
# Firebase cache
11+
.firebase/
12+
13+
# Firebase config
14+
15+
# Uncomment this if you'd like others to create their own Firebase project.
16+
# For a team working on the same Firebase project(s), it is recommended to leave
17+
# it commented so all members can deploy to the same project(s) in .firebaserc.
18+
# .firebaserc
19+
20+
# Runtime data
21+
pids
22+
*.pid
23+
*.seed
24+
*.pid.lock
25+
26+
# Directory for instrumented libs generated by jscoverage/JSCover
27+
lib-cov
28+
29+
# Coverage directory used by tools like istanbul
30+
coverage
31+
32+
# nyc test coverage
33+
.nyc_output
34+
35+
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
36+
.grunt
37+
38+
# Bower dependency directory (https://bower.io/)
39+
bower_components
40+
41+
# node-waf configuration
42+
.lock-wscript
43+
44+
# Compiled binary addons (http://nodejs.org/api/addons.html)
45+
build/Release
46+
47+
# Dependency directories
48+
node_modules/
49+
50+
# Optional npm cache directory
51+
.npm
52+
53+
# Optional eslint cache
54+
.eslintcache
55+
56+
# Optional REPL history
57+
.node_repl_history
58+
59+
# Output of 'npm pack'
60+
*.tgz
61+
62+
# Yarn Integrity file
63+
.yarn-integrity
64+
65+
# dotenv environment variables file
66+
.env
67+
68+
# dataconnect generated files
69+
.dataconnect

firebase.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"hosting": {
3+
"site": "app-link-testing2",
4+
"public": "public",
5+
"ignore": ["firebase.json", "**/.*", "**/node_modules/**"]
6+
}
7+
}

public/.well-known/assetlinks.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
[{
2+
"relation": ["delegate_permission/common.handle_all_urls"],
3+
"target": {
4+
"namespace": "android_app",
5+
"package_name": "com.example.app_link_testing",
6+
"sha256_cert_fingerprints": [
7+
"D6:2D:D6:B9:6E:DD:3D:A7:FB:07:69:F4:2F:4B:CD:7E:E4:98:32:C5:70:9A:AE:D5:73:C2:28:66:C1:0D:D9:48"
8+
// "SHA256: D6:2D:D6:B9:6E:DD:3D:A7:FB:07:69:F4:2F:4B:CD:7E:E4:98:32:C5:70:9A:AE:D5:73:C2:28:66:C1:0D:D9:48"
9+
]
10+
}
11+
}]

public/404.html

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta charset="utf-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1">
6+
<title>Page Not Found</title>
7+
8+
<style media="screen">
9+
body { background: #ECEFF1; color: rgba(0,0,0,0.87); font-family: Roboto, Helvetica, Arial, sans-serif; margin: 0; padding: 0; }
10+
#message { background: white; max-width: 360px; margin: 100px auto 16px; padding: 32px 24px 16px; border-radius: 3px; }
11+
#message h3 { color: #888; font-weight: normal; font-size: 16px; margin: 16px 0 12px; }
12+
#message h2 { color: #ffa100; font-weight: bold; font-size: 16px; margin: 0 0 8px; }
13+
#message h1 { font-size: 22px; font-weight: 300; color: rgba(0,0,0,0.6); margin: 0 0 16px;}
14+
#message p { line-height: 140%; margin: 16px 0 24px; font-size: 14px; }
15+
#message a { display: block; text-align: center; background: #039be5; text-transform: uppercase; text-decoration: none; color: white; padding: 16px; border-radius: 4px; }
16+
#message, #message a { box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24); }
17+
#load { color: rgba(0,0,0,0.4); text-align: center; font-size: 13px; }
18+
@media (max-width: 600px) {
19+
body, #message { margin-top: 0; background: white; box-shadow: none; }
20+
body { border-top: 16px solid #ffa100; }
21+
}
22+
</style>
23+
</head>
24+
<body>
25+
<div id="message">
26+
<h2>404</h2>
27+
<h1>Page Not Found</h1>
28+
<p>The specified file was not found on this website. Please check the URL for mistakes and try again.</p>
29+
<h3>Why am I seeing this?</h3>
30+
<p>This page was generated by the Firebase Command-Line Interface. To modify it, edit the <code>404.html</code> file in your project's configured <code>public</code> directory.</p>
31+
</div>
32+
</body>
33+
</html>

public/index.html

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6+
<title>App Link Test</title>
7+
<script src="https://cdn.tailwindcss.com"></script>
8+
</head>
9+
<body class="flex items-center justify-center h-screen bg-gray-100">
10+
<div class="text-center">
11+
<h1 class="text-4xl font-bold text-blue-600">App Link Test Page</h1>
12+
<p class="mt-4 text-gray-700">Click a link to open the app:</p>
13+
<a
14+
href="https://app-link-testing2.web.app/user/123"
15+
class="mt-4 inline-block px-4 py-2 bg-blue-500 text-white rounded hover:bg-blue-600"
16+
>
17+
Open in App
18+
</a>
19+
</div>
20+
</body>
21+
22+
<script type="module">
23+
// Import the functions you need from the SDKs you need
24+
import { initializeApp } from "https://www.gstatic.com/firebasejs/12.1.0/firebase-app.js";
25+
import { getAnalytics } from "https://www.gstatic.com/firebasejs/12.1.0/firebase-analytics.js";
26+
// TODO: Add SDKs for Firebase products that you want to use
27+
// https://firebase.google.com/docs/web/setup#available-libraries
28+
29+
// Your web app's Firebase configuration
30+
// For Firebase JS SDK v7.20.0 and later, measurementId is optional
31+
const firebaseConfig = {
32+
apiKey: "AIzaSyCG2VNRUnUvf1Q0OT82Mb7-yEm94xTi_HM",
33+
authDomain: "project2-f5cb2.firebaseapp.com",
34+
databaseURL:
35+
"https://project2-f5cb2-default-rtdb.asia-southeast1.firebasedatabase.app",
36+
projectId: "project2-f5cb2",
37+
storageBucket: "project2-f5cb2.appspot.com",
38+
messagingSenderId: "180310985028",
39+
appId: "1:180310985028:web:1cfee351fae8e137eb6f11",
40+
measurementId: "G-5K3T7W10SX",
41+
};
42+
43+
// Initialize Firebase
44+
const app = initializeApp(firebaseConfig);
45+
const analytics = getAnalytics(app);
46+
</script>
47+
</html>

0 commit comments

Comments
 (0)