frontend app plus backend server for animal locator drone
- This app is written in VueJS as a simple web application with reactive and interactive elements.
- The goal is to display mission progress and allow users to look for their dog in detections coming from a drone.
- The backend will be handled by a REST API and potentially some Socket-IO for more real-time communcations if needed.
- We are using TypeScript which is just like Javascript but it supports actual typing like a real programming language.
- More on that https://www.typescriptlang.org/
- To contribute you will need to know the basics of vuejs.
- head over to https://vuejs.org/guide/quick-start.html to get started quickly.
- Play around with vuejs on your own before you start touching the repo to get a good idea of how it works.
- The code is located in the nested dogfinder-app folder.
- Install NodeJS
- This depends on your system. It's on you to figure out how to get nodejs up and running.
- Depending on how you installed nodejs you may also need to install
corepack
- Try running
corepack enable
first to see if you already have corepack - If you don't have it run this command
sudo npm -g install corepack
- This also provides you with the
yarn
package manager which is what we use to manage a lot of the code
- Get the code base
- cd into a folder where you want to work on the code.
- Clone the repo using git
git clone https://github.com/animal-locator-drone/dogfinder-app.git
- You can also just do this using vscode
- cd into the code folder
cd dogfinder-app/dogfinder-app
- or do this with vscode
- install package dependencies
yarn
- setup your config file
- copy the
.env.example
file to.env
- fill in the values in the
.env
file - You may need to set
VITE_SOCKET_URL
to the correct value
- copy the
- Setup the videos folder with
drone.mp4
- Create a folder
dogfinder-app/dogfinder-app/public/videos
- Download an appropriate drone video and place it in there and call it
drone.mp4
- Create a folder
- Run the dev server
- make sure you're in the right folder
dogfinder-app/dogfinder-app
yarn start
- This will launch the backend server locally in development mode that you can access with the displayed url/port in the terminal.
- Open your browser to the displayed url of course.
- make sure you're in the right folder
- Everything in the root folder is configuration files and documentation
- except for the
index.html
file- This is the entry point for the app.
- except for the
server.js
is the backend web server written using express.src
contains most of the typescript code base that makes up the app and it is also organized nicely.assets
- contains static files like css and images
components
- contains the smaller components that make up the bigger app.
router
- Determines how you navigate the app breaking it into "views"
stores
- These are local data management files that can be imported and shared between components
- more on that https://pinia.vuejs.org/
- These are local data management files that can be imported and shared between components
views
- These are the overall structure that hold the
components
- These are the overall structure that hold the
App.vue
- This is the main file for Vuejs this is where things start.
main.ts
- This file is how the app is initialized and we can add other extensions to vue such as the vue-router
public
- This is where the code that runs on the browser gets deployed.
You should never have to edit this folder this is outputted by vuejs- This folder also contains any static files you want to serve to the frontend such as images and videos.
node_modules
- this is where yarn packages are stored.
- Never touch these if you value your sanity.
- you may also see a
.vscode
folder this is where vscode settings get stored and has nothing to do with the project.