demo_elixir_phoenix_liveview

Demo Elixir Phoenix LiveView with the Chirp Twitter-like application by Chris McCord

https://github.com/joelparkerhenderson/demo_elixir_phoenix_liveview

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (5.2%) to scientific vocabulary
Last synced: 7 months ago · JSON representation ·

Repository

Demo Elixir Phoenix LiveView with the Chirp Twitter-like application by Chris McCord

Basic Info
  • Host: GitHub
  • Owner: joelparkerhenderson
  • Language: Elixir
  • Default Branch: master
  • Size: 1.48 MB
Statistics
  • Stars: 3
  • Watchers: 1
  • Forks: 3
  • Open Issues: 16
  • Releases: 0
Created over 5 years ago · Last pushed about 1 year ago
Metadata Files
Readme Code of conduct Citation

README.md

Demo Elixir Phoenix LiveView

Demonstration of:

  • Elixir programming language
  • Phoenix web framework
  • LiveView socket module
  • Chirp Twitter-like app

This is the source code for the Elixir Phoenix LiveView tutorial by Chris McCord.

Create Phoenix app

Create a Phoenix app named "chirp":

sh mix phx.new chirp --live && cd chirp

Generate LiveView Timeline Post

Generate a live resource:

sh mix phx.gen.live Timeline Post posts username body likes_count:integer reposts_count:integer

Output:

```sh * creating lib/chirpweb/live/postlive/show.ex * creating lib/chirpweb/live/postlive/index.ex * creating lib/chirpweb/live/postlive/formcomponent.ex * creating lib/chirpweb/live/postlive/formcomponent.html.leex * creating lib/chirpweb/live/postlive/index.html.leex * creating lib/chirpweb/live/postlive/show.html.leex * creating test/chirpweb/live/postlivetest.exs * creating lib/chirpweb/live/modalcomponent.ex * creating lib/chirpweb/live/livehelpers.ex * creating lib/chirp/timeline/post.ex * creating priv/repo/migrations/20200724010645createposts.exs * creating lib/chirp/timeline.ex * injecting lib/chirp/timeline.ex * creating test/chirp/timelinetest.exs * injecting test/chirp/timelinetest.exs * injecting lib/chirpweb.ex

Add the live routes to your browser scope in lib/chirp_web/router.ex:

live "/posts", PostLive.Index, :index
live "/posts/new", PostLive.Index, :new
live "/posts/:id/edit", PostLive.Index, :edit

live "/posts/:id", PostLive.Show, :show
live "/posts/:id/show/edit", PostLive.Show, :edit

Remember to update your repository by running migrations:

$ mix ecto.migrate

```

Migrate:

sh mix ecto.migrate

Output:

```sh ...

18:09:15.939 [info] == Running 20200724010645 Chirp.Repo.Migrations.CreatePosts.change/0 forward

18:09:15.942 [info] create table posts

18:09:15.957 [info] == Migrated 20200724010645 in 0.0s ```

Run server:

sh mix phx.server

Browse http://localhost:4000/posts

Customize Post

Edit file lib/chirp_web/live/post_live/form_component.html.leex. Add better UI, as per the video.

Edit file lib/chirp/timeline/post.ex. Add data defaults and validations, as per the video.

Owner

  • Name: Joel Parker Henderson
  • Login: joelparkerhenderson
  • Kind: user
  • Location: California

Software developer. Technology consultant. Creator of GitAlias.com, NumCommand.com, SixArm.com, and many open source projects.

Citation (CITATION.cff)

cff-version: 1.2.0
title: Demo Elixir Phoenix LiveView
message: >-
  If you use this work and you want to cite it,
  then you can use the metadata from this file.
type: software
authors:
  - given-names: Joel Parker
    family-names: Henderson
    email: joel@joelparkerhenderson.com
    affiliation: joelparkerhenderson.com
    orcid: 'https://orcid.org/0009-0000-4681-282X'
identifiers:
  - type: url
    value: 'https://github.com/joelparkerhenderson/demo_elixir_phoenix_liveview/'
    description: Demo Elixir Phoenix LiveView
repository-code: 'https://github.com/joelparkerhenderson/demo_elixir_phoenix_liveview/'
abstract: >-
  Demo Elixir Phoenix LiveView
license: See license file

GitHub Events

Total
  • Push event: 1
Last Year
  • Push event: 1

Committers

Last synced: over 1 year ago

All Time
  • Total Commits: 14
  • Total Committers: 1
  • Avg Commits per committer: 14.0
  • Development Distribution Score (DDS): 0.0
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Joel Parker Henderson j****l@j****m 14
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 12 months ago

All Time
  • Total issues: 0
  • Total pull requests: 16
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Total issue authors: 0
  • Total pull request authors: 1
  • Average comments per issue: 0
  • Average comments per pull request: 0.0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 16
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
  • dependabot[bot] (16)
Top Labels
Issue Labels
Pull Request Labels
dependencies (16)

Dependencies

mix.exs hex
  • ecto_sql ~> 3.4
  • floki >= 0.0.0
  • gettext ~> 0.11
  • jason ~> 1.0
  • phoenix ~> 1.5.3
  • phoenix_ecto ~> 4.1
  • phoenix_html ~> 2.11
  • phoenix_live_dashboard ~> 0.2.0
  • phoenix_live_reload ~> 1.2
  • phoenix_live_view ~> 0.13.0
  • plug_cowboy ~> 2.0
  • postgrex >= 0.0.0
  • telemetry_metrics ~> 0.4
  • telemetry_poller ~> 0.4
assets/package-lock.json npm
  • 787 dependencies
assets/package.json npm
  • @babel/core ^7.0.0 development
  • @babel/preset-env ^7.0.0 development
  • @fortawesome/fontawesome-free ^5.14.0 development
  • babel-loader ^8.0.0 development
  • copy-webpack-plugin ^5.1.1 development
  • css-loader ^3.4.2 development
  • file-loader ^6.0.0 development
  • mini-css-extract-plugin ^0.9.0 development
  • node-sass ^4.13.1 development
  • optimize-css-assets-webpack-plugin ^5.0.1 development
  • sass-loader ^8.0.2 development
  • terser-webpack-plugin ^2.3.2 development
  • webpack 4.41.5 development
  • webpack-cli ^3.3.2 development
  • nprogress ^0.2.0
  • phoenix file:../deps/phoenix
  • phoenix_html file:../deps/phoenix_html
  • phoenix_live_view file:../deps/phoenix_live_view
mix.lock hex