Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/deve-sh/housie
A small and fun web-app for playing Housie. 🏠 Built using Svelte and Firebase.
https://github.com/deve-sh/housie
game housie svelte
Last synced: 5 days ago
JSON representation
A small and fun web-app for playing Housie. 🏠 Built using Svelte and Firebase.
- Host: GitHub
- URL: https://github.com/deve-sh/housie
- Owner: deve-sh
- Created: 2021-10-07T05:44:48.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2022-06-06T17:49:49.000Z (over 2 years ago)
- Last Synced: 2023-03-06T19:17:25.010Z (over 1 year ago)
- Topics: game, housie, svelte
- Language: JavaScript
- Homepage: https://housie-game.vercel.app
- Size: 143 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Housie 🏠
A small and fun web-app for playing Housie. 🏠 Built using Svelte and Firebase.
### Setting Up
Clone the repo, create a Firebase project, copy its config.
Create a file called `config.js` in `src/firebase` and paste the config as follows. This is done because Svelte doesn't have a clear working of `process.env` and injected environment variables yet.
```javascript
const firebaseConfig = {
apiKey: "AIzaS...",
authDomain: "housie.firebaseapp.com",
projectId: "housie",
storageBucket: "housie.appspot.com",
messagingSenderId: "6205...",
appId: "1:...",
};export default firebaseConfig;
```Run the following commands:
```bash
npm install
npm run dev
```The app should function as expected.
### Hosting The App
There is a `createFirebaseConfig.js` file that generates firebase config file for you from the environment variables that are available to it. So for services like Vercel, just add your Firebase config as an object string to the environment variables and set the build command to:
```bash
node ./createFirebaseConfig.js && npm run build
```or
```bash
node ./createFirebaseConfig.js && rollup -c # Since this project uses Rollup with Svelte
```### Firestore Security Rules required
Very basic, please feel free to extend.
```
match /games/{gameId} {
allow create: if isSignedIn();
allow update: if isSignedIn() &&
resource.data.createdBy == request.resource.data.createdBy;
allow get: if isSignedIn();
allow list: if false;
}
```Don't forget to allow sign-in from your hosted domains for Firebase Authentication.