A real-time Chat web application built with Elixir and the Phoenix LiveView framework, featuring user authentication, email delivery via Brevo, and a production-ready Docker + Fly.io deployment pipeline.
Sendit is a Phoenix 1.8 LiveView application that provides a modern, reactive user experience without writing custom JavaScript. It ships with:
- Full authentication — registration, login, session management, and email confirmation powered by
phx.gen.auth - Transactional email — sent via the Brevo API
- Real-time UI — LiveView streams for efficient, low-latency DOM updates
- Tailwind CSS v4 — utility-first styling with no
tailwind.config.jsrequired - PostgreSQL — backed by Ecto for safe, schema-driven database access
- Docker & Fly.io — production-grade containerization and one-command deploys
0518.mp4
| Layer | Technology |
|---|---|
| Language | Elixir ~> 1.15 |
| Web Framework | Phoenix 1.8.5 |
| Frontend | Phoenix LiveView 1.1, Tailwind CSS v4, esbuild |
| Database | PostgreSQL (via Ecto + Postgrex) |
| Brevo API, gen_smtp, Swoosh | |
| HTTP Client | Req |
| Auth | bcrypt_elixir, phx.gen.auth |
| Server | Bandit |
| Container | Docker (Debian Trixie slim) |
| Hosting | Fly.io |
- Elixir
>= 1.15— Install guide - Erlang/OTP
>= 26 - Node.js
>= 18(for asset bundling) - PostgreSQL
>= 14 - A Brevo account and API key for email delivery
git clone https://github.com/Null-logic-0/sendit.git
cd senditmix setupThis single command will:
- Fetch all Elixir and Node.js dependencies
- Create and migrate the PostgreSQL database
- Seed initial data
- Install and build frontend assets (Tailwind + esbuild)
mix phx.serverOr start inside an interactive IEx session:
iex -S mix phx.serverThe application will be available at http://localhost:4000.
Environment-specific configuration lives in the config/ directory:
| File | Purpose |
|---|---|
config/config.exs |
Shared compile-time configuration |
config/dev.exs |
Development settings |
config/test.exs |
Test settings |
config/runtime.exs |
Runtime/production environment variables |
For production, set the following environment variables:
DATABASE_URL=ecto://user:password@host/sendit
SECRET_KEY_BASE=<64-character secret>
PHX_HOST=yourdomain.com
BREVO_API_KEY=re_xxxxxxxxxxxxGenerate a secret key with:
mix phx.gen.secretmix testTo run only previously failing tests:
mix test --failedTo run a specific test file:
mix test test/sendit_web/live/some_live_test.exsBefore committing, run the full pre-commit suite (compile, format, unused deps check, and tests):
mix precommitBuild the production image:
docker build -t sendit .Run the container:
docker run -e DATABASE_URL=... -e SECRET_KEY_BASE=... -e PHX_HOST=... -p 4000:4000 senditThe repository includes a fly.toml configuration. Deploy with:
fly deploySet secrets on Fly.io:
fly secrets set SECRET_KEY_BASE=$(mix phx.gen.secret)
fly secrets set DATABASE_URL=ecto://...
fly secrets set BREVO_API_KEY=re_...sendit/
├── assets/ # Frontend assets (JS, CSS)
├── config/ # Application configuration
├── lib/
│ ├── sendit/ # Core business logic and contexts
│ └── sendit_web/ # Web layer (LiveViews, controllers, components, router)
├── priv/
│ ├── repo/ # Database migrations and seeds
│ └── static/ # Compiled static assets
├── test/ # ExUnit test suite
├── rel/ # Release configuration
├── Dockerfile # Multi-stage production Docker build
├── fly.toml # Fly.io deployment configuration
├── mix.exs # Project definition and dependencies
Contributions are welcome! Please follow these steps:
- Fork the repository
- Create a feature branch:
git checkout -b feature/your-feature-name - Make your changes and run
mix precommitto ensure everything passes - Commit your changes:
git commit -m "feat: describe your change" - Push to your fork:
git push origin feature/your-feature-name - Open a Pull Request
- Elixir code is formatted with
mix format— enforced by the pre-commit alias - Tailwind CSS classes are used for all styling;
@applyis not used - LiveView streams are preferred over plain list assigns for collections
This project is licensed under the MIT License.