Skip to content

Commit

Permalink
chore: Update configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
spotandjake committed Sep 13, 2024
1 parent 4f81c8c commit dcb8e76
Show file tree
Hide file tree
Showing 6 changed files with 10,018 additions and 7,118 deletions.
71 changes: 0 additions & 71 deletions .github/workflows/codeql-analysis.yml

This file was deleted.

3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.next/
node_modules/
out/
.DS_Store
.DS_Store
.yarn/
1 change: 1 addition & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nodeLinker: node-modules
8 changes: 7 additions & 1 deletion Cloud Functions/Notification.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/**
* This is a test implementation of a notification system, using firebase cloud functions.
* As this would cost money to run it is currently not deployed.
*
* This implementation is more of an example annd is not complete as such it can only ping me.
*/
const functions = require('firebase-functions');
const admin = require('firebase-admin');
admin.initializeApp();
Expand All @@ -13,7 +19,7 @@ exports.Notifcation = functions.firestore
title: `${snapshot.data().Owner} Said:`,
body: text ? (text.length <= 100 ? text : `${text.substring(0, 97)}...`) : '',
icon: snapshot.data().Picture,
click_action: 'https://neofox.spotandjake.repl.co/',
click_action: 'https://spotandjake.github.io/NeoFox',
}
};
let Pings = [ 'mHvcak8OjqZglBlENhQSLqBOgPB3' ];
Expand Down
33 changes: 23 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,25 @@
# NeoFox
A Serverless React Based Chat Application Similar To Discord, Using Firebase.
[View on Replit](https://replit.com/@Spotandjake/NeoFox)
# HowTo
To get the program running replace:
NeoFox is a serverless React based chat application, similar to Discord or Slack. It was written with the intent of gaining a better understanding of scaling projects and using React. The project is visible at [here](https://spotandjake.github.io/NeoFox) unfortunately as this project is hosted through github pages invites will not work properly as they make use of `Next` dynamic routes.

# Background
This project uses Firebase Firestore for holding the messages, server and user data and Firebase Realtime Database for managing typing indicators. The infrastructure is somewhat setup for using Firebase Cloud Functions for push notifications although as this would cost money to host I have not configured it at the moment. NeoFox additionally uses Firebase Storage for storing images and files and Firebase Analytics for user data and performance tracking. It is okay to expose the firebase configs as long as you have your firebase security rules configured correctly and additionally your firebase auth restricted to your domain.

# Building
In order to install run:
```
yarn install --immutable
```
and then you can use:
```
yarn dev
```
to run the development server. In order to build the app run:
```
yarn start
```

# Config
In order to run the application locally or on your own server you will need to replace the firebase configurations, replace the `config` in `Firebase.ts` with your configuration it looks something like the one below:
```js
const config = {
apiKey: 'AIzaSyBCpFkdcCLQ9r_rO-R-LquOPDlLK3WG20s',
Expand All @@ -15,13 +32,9 @@ const config = {
messagingSenderId: '624818190747'
};
```
with your firebase config inside Firebase.ts:
replace
and replace the storage bucket url in `next.env.d.ts` with your storage bucket, it will look something like:
```js
env: {
Storage_Url: 'https://storage.googleapis.com/united-rope-234818.appspot.com'
},
```
with your storage url inside of next.env.d.ts
runs on node 12 and above
pls make a new node repl. this project uses firebase firestore for holding the messages and server and user data and firebase rtdb for typign indicators. it will soon use cloud functions for notifications and it uses firebase storage for file storage along with firebase analytics and performance.
```
Loading

0 comments on commit dcb8e76

Please sign in to comment.