Skip to content

willzoo/OSC-Proximity-Chat-App

 
 

Repository files navigation

OSC-Proximity-Chat-App

We're making an app that allows you to talk to people within a set radius around you, anonymously. You could use this to easily chat with people at very populated places, like a library or dining hall on campus.

Drop ideas into the planning doc (Google Docs)

Design plans (Figma)

Developer instructions

Install Node.js

First, make sure you have the latest stable version of Node.js installed on you system.

Then, fork this repository and run git clone <url of forked repo>.

Linux

Install Node Version Manager (Github) and follow the installation instructions. Check to see if your distro's package manager carries nvm before this, though.

After nvm is installed run nvm install node and then nvm use node.

Windows

Install Linux immediately

Client

Install the ExpoGo app from the Google Play Store or App Store on your phone.

cd into client and install the dependencies: npm install.

Create a .env file from the config_example.md by obtaining the IP address of your local machine (you can either use https://whatismyipaddress.com/ or the bash command ifconfig en0 | awk '$1 == "inet" { print $2 }' to obtain it)

Use npm start to start the program and scan the QR code using the ExpoGo App (Android) or the Camera App (iOS).

Server

Set up a Firestore instance

  1. Log into a Google account you wish to use for development
  2. Go to https://firebase.google.com/ and click "Get started"
  3. Click "add a project"
  4. Type in a project name, click continue
  5. Disable Google Analytics, click create project
  6. When the project is done being created, click the settings icon in the sidebar and then "Project settings"
  7. Underneath the "Your apps" section, click the web development icon (looks like </>)
  8. Type a name in for your app, do not check the Firebase Hosting box and click "register app"
  9. Copy the listed configuration keys into /server/config_example.md, and rename the file to .env
  10. Click continue to console, and go to Build > Firestore Database on the sidebar, and click create database
  11. Select the nam5 server, and click next
  12. Start in test mode, click enable
  13. Create two collections, one named messages and another named users
  • Make a document with random information to create the collections. The fields won't matter as the correct ones will be added via the functions of our app itself
  1. Set up composite indexing
  • Go to the Indexes tab in Cloud Firestore
  • Click "Add index"
  • set Collection ID to messages
  • Add a field, and set the three field paths to broadLat, broadLon, and timeSent
  • Set the Query scope to Collection and click "Create index"
  • After the index finishes building, all endpoints related to querying messages will work
  1. While running the server, the database should be connected and good to go! For more information on how our database works, look at ApiChecklist.md and see the Firestore documentation at https://firebase.google.com/docs/firestore/

Installing dependencies

cd into server and install the dependencies: npm install.

While working, run npx tsc to compile the typescript code into the build directory as Javascript. Or run npx tsc -w in a seperate terminal to recompile on file changes.

Start the server: npm start.

Contributing

Please read CONTRIBUTING.md.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 99.7%
  • JavaScript 0.3%