Skip to content

Commit

Permalink
Add first Svelte app
Browse files Browse the repository at this point in the history
  • Loading branch information
patnorris authored and patnorris committed Feb 16, 2023
1 parent bdeff5e commit b219f39
Show file tree
Hide file tree
Showing 80 changed files with 3,481 additions and 2,750 deletions.
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -106,4 +106,9 @@ dist
# TernJS port file
.tern-port

.dfx
.dfx

.DS_Store
dist-ssr
*.local
.vessel
5 changes: 5 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"singleQuote": false,
"trailingComma": "all",
"semi": true
}
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ dfx start --background
# Install dependencies
npm install

npm run dev

# Deploys your canisters to the replica and generates your candid interface
Local:
dfx deploy --argument "(
Expand All @@ -46,6 +48,8 @@ dfx deploy --argument "(
}
)"

npm run vite

dfx deploy --network ic --argument "(
principal\"$(dfx identity get-principal)\",
record {
Expand Down Expand Up @@ -84,6 +88,8 @@ npm start

Which will start a server at `http://localhost:8080`, proxying API requests to the replica at port 8000.

Fund wallet with cycles (from ICP): https://medium.com/dfinity/internet-computer-basics-part-3-funding-a-cycles-wallet-a724efebd111

Top up cycles:
dfx identity --network=ic get-wallet
dfx wallet --network ic balance
Expand All @@ -92,6 +98,11 @@ dfx canister --network ic status PersonalWebSpace_frontend
dfx canister --network ic --wallet 3v5vy-2aaaa-aaaai-aapla-cai deposit-cycles 3000000000000 PersonalWebSpace_backend
dfx canister --network ic --wallet 3v5vy-2aaaa-aaaai-aapla-cai deposit-cycles 300000000000 PersonalWebSpace_frontend

2023-02-16:
topped up 7T cycles each for new balances:
PersonalWebSpace_backend Balance: 10_896_387_427_956 Cycles
PersonalWebSpace_frontend Balance: 10_220_358_949_308 Cycles

### Note on frontend environment variables

If you are hosting frontend code somewhere without using DFX, you may need to make one of the following adjustments to ensure your project does not fetch the root key in production:
Expand Down
18 changes: 4 additions & 14 deletions dfx.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,26 +9,16 @@
"PersonalWebSpace_backend"
],
"frontend": {
"entrypoint": "src/PersonalWebSpace_frontend/src/index.html"
"entrypoint": "dist/index.html"
},
"source": [
"src/PersonalWebSpace_frontend/assets",
"dist/PersonalWebSpace_frontend/"
],
"source": ["dist/"],
"type": "assets"
}
},
"defaults": {
"build": {
"args": "",
"packtool": ""
}
},
"dfx": "0.11.1",
"networks": {
"local": {
"bind": "127.0.0.1:8000",
"type": "ephemeral"
"packtool": "vessel sources",
"args": ""
}
},
"version": 1
Expand Down
20 changes: 20 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<!DOCTYPE html>
<html lang="en">

<head>
<title>Open Internet Metaverse App</title>
<meta name='author' content='Alex Agudelo, Patrick Friedrich'>
<meta name='description' content='Users can create and edit their Personal Web Spaces on this web app. Each Personal Web Space is itself an NFT hosted on the Internet Computer blockchain platform, contains all data to be rendered and displayed as a 3D webpage in any browser and can be viewed at a unique URL. On this web app, Users can see which spaces they own and how they look when displayed as a webpage. They can then go ahead and edit their spaces (and thus the displayed 3D webpage).'>
<meta name='robots' content='index, follow'>
<meta charset='UTF-8'>
<meta name='viewport' content='width=device-width, initial-scale=1'>
<script src="https://aframe.io/releases/1.3.0/aframe.min.js"></script>
<script src="//cdn.rawgit.com/donmccurdy/aframe-extras/v3.8.3/dist/aframe-extras.min.js"></script>
</head>

<body>
<div id="root"></div>
<script type="module" src="/src/PersonalWebSpace_frontend/main.ts"></script>
</body>

</html>
Loading

0 comments on commit b219f39

Please sign in to comment.