Litelist is an opensource local network shopping portal. It is developed as a local alternative to craigslist and Encuentro24, and can be installed on low resource computers like the Raspberry Pi. It was initially developed by Dhruv Mehrotra and Andrew Gimma as “Othernet” through Mozilla WINS (Wireless Innovation for Network Societies) Challenge grant. It is now currently being developed by SayCel, and is beta-testing on Ole.net, a community network in Olekasasi, Kenya.
Lite.list is developed using Phoenix and Elixir programming language to provide a scalable, low latency solution for local networks or distributed systems.
- Remove assets/node_modules from within your existing container
- Run
npm installwithin the assets folder, also from within the docker container
- Docker
- Docker Compose
- Clone this repo
cd Litelistchmod +x run.sh- Make sure ports 4000 and 5432 (postgres) are free. Run
brew services stop postgresqlon Mac. docker-compose up --builddocker-compose run web mix testto run tests.- Note that it takes Webpack about 10 seconds to load js and css. We will work to improve this in the future.
docker-compose run web iex -S miximport Litelist.Factoryattrs = %{username: "ADD_NAME_HERE"}Note: Don't change the password attr. The password will default to 'password'.insert(:neighbor, attrs)
- Go to localhost:4000 and login with credentials created from above
- localhost:4000/secret can only be seen by authenticated users
Note: See Docker usage below for more commands.
Run commands prepended with docker-compose run web
mix ecto.migrate becomes docker-compose run web mix ecto.migrate
mix ecto.migrate becomes docker-compose run web mix ecto.migrate
Amnesia is an elixir wrapper around erlang's Mnesia database.
This database is used for settings because it has a stronger guarantee that it will be read than postgres has. As long as the site is up, the Mnesia SettingsDatabase should be available.
Note: Setup should be automatically handled in run.s
docker-compose run web mix amnesia.create --database Litelist.Settings.SettingsDatabase --disk
docker-compose run web /bin/bashmkdir mnesiaMIX_ENV=test mix amnesia.create --database Litelist.Settings.SettingsDatabase --disk
docker-compose run web mix ecto.rollbackdocker-compose run web mix ecto.migratedocker-compose run web mix ecto.seedSeeds the databasedocker-compose run web mix testdocker-compose run web /bin/bashMIX_ENV=test mix ecto.resetNote: Reset test database after running the above command.docker-compose run web mix coverallsdocker-compose run web mix coveralls.detaildocker-compose run web mix credo -aCredo is a static code analysis tool for the Elixir language with a focus on code consistency and teaching.docker-compose run web mix docsDocuments repo code. Check out docs/index.htmldocker-compose run web mix format FILENAMEFormats a file according to Elixir standardsdocker-compose run web mix amnesia.create --database Litelist.Settings.SettingsDatabase --diskCreate Mnesia databasedocrw mix amnesia.drop -d Litelist.Settings.SettingsDatabaseDrop Mnesia database
docker-compose run web mix deps.update postgrexIf you can't connect to the db