here-i-am/README.md

66 lines
1.9 KiB
Markdown

# Here I Am
## Description
Here I Am is a Phoenix application that monitors devices connecting to your local network and plays a text-to-speech message using `espeak` when a new device is detected. The application uses `arp-scan` to identify devices on the network.
## Prerequisites
### Erlang and Elixir
In this project, these are managed by `asdf`. You will need to install ['https://github.com/asdf-vm/asdf](ASDF), ['https://github.com/asdf-vm/asdf-erlang](ASDF Erlang), and ['https://github.com/asdf-vm/asdf-elixir](ASDF Elixir). Be sure to read on what the Erlang / Elixir ASDF prerequisites are before installing the plugins.
Alternatively, you can install erlang/elixir without a version manager but that won't be covered here.
### Installing `espeak`
Install `espeak` on your system:
```bash
# On Debian/Ubuntu-based systems
sudo apt-get install espeak
# Fedora/RHEL
sudo dnf install espeak
```
### Installing `arp-scan`
Install `arp-scan` on your system:
```bash
# On Debian/Ubuntu-based systems
sudo apt-get install arp-scan
# Fedora/RHEL
sudo dnf install arp-scan
```
### Configuring `sudo` for `arp-scan`
To allow `arp-scan` to run without a password, edit the `sudoers` file:
```bash
sudo visudo
```
Add the following line to allow your user to run `arp-scan` without a password (replace `yourusername` with your actual username):
```plaintext
yourusername ALL=(ALL) NOPASSWD: /usr/sbin/arp-scan
```
Your arp-scan installation may not be in `/usr/sbin/arp-scan`. Please run `whereis arp-scan` to find the correct path for the above config.
## Setup
To start your Phoenix server:
* Run `mix setup` to install and setup dependencies
* Start Phoenix endpoint with `mix phx.server` or inside IEx with `iex -S mix phx.server`
Now you can visit [`localhost:4000`](http://localhost:4000) from your browser.
Ready to run in production? Please [check the deployment guides](https://hexdocs.pm/phoenix/deployment.html).