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)
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
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).
Set up a Firestore instance
- Log into a Google account you wish to use for development
- Go to https://firebase.google.com/ and click "Get started"
- Click "add a project"
- Type in a project name, click continue
- Disable Google Analytics, click create project
- When the project is done being created, click the settings icon in the sidebar and then "Project settings"
- Underneath the "Your apps" section, click the web development icon (looks like
</>
) - Type a name in for your app, do not check the Firebase Hosting box and click "register app"
- Copy the listed configuration keys into
/server/config_example.md
, and rename the file to.env
- Click continue to console, and go to Build > Firestore Database on the sidebar, and click create database
- Select the nam5 server, and click next
- Start in test mode, click enable
- Create two collections, one named
messages
and another namedusers
- 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
- Set up composite indexing
- Go to the Indexes tab in Cloud Firestore
- Click "Add index"
- set
Collection ID
tomessages
- Add a field, and set the three field paths to
broadLat
,broadLon
, andtimeSent
- Set the Query scope to
Collection
and click "Create index" - After the index finishes building, all endpoints related to querying messages will work
- 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
.
Please read CONTRIBUTING.md.