ProductPromotion
Logo

Elixir

made by https://0x3d.site

GitHub - bharani91/ex-shop: Digital goods shop & blog created using Elixir (Phoenix framework)
Digital goods shop & blog created using Elixir (Phoenix framework) - bharani91/ex-shop
Visit Site

GitHub - bharani91/ex-shop: Digital goods shop & blog created using Elixir (Phoenix framework)

GitHub - bharani91/ex-shop: Digital goods shop & blog created using Elixir (Phoenix framework)

Authentic Pixels

Digital goods shop & blog created using Phoenix Framework (Elixir)

This is the source code for my new website - Authentic Pixels. Through Authentic Pixels, I plan to deliver high quality free & premium web resources including Bootstrap HTML templates, startup landing pages, UI kits, mockups & themes for Ghost & Wordpress.


Demo & Screenshots

View the live website here - Authentic Pixels

Here are some screenshots of the admin area.

Authentic Pixels - Product Editor

Authentic Pixels - Dashboard

This project has been a great learning experience for me. Coming from Ruby on Rails, there are a lot of things that are done differently in Elixir/Phoenix and building this app has helped me understand the "Elixir way" of doing things.

Some of the things that this project helped me wrap my head around are -

  1. Nested records & associations (e.g: Product has many variants)
  2. Handling many-to-many associations and validating them
  3. Uploading images
  4. Testing
  5. Switching to Webpack from Brunch
  6. Creating Sitemaps and running a cron task to regularly run the sitemap generation task
  7. Deploying (to a Digital Ocean box using Dokku)
  8. Sending HTML emails.
  9. Separating admin area from frontend using differnt layouts and scopes in router.ex

I will be writing about this is a lot more detail on my blog soon.


Installation

  1. Clone the repository and install the dependencies
git clone [email protected]:authentic-pixels/exshop.git
cd exshop
mix deps.get
npm install
  1. Create the database and run the migrations
mix ecto.create
mix ecto.migrate
  1. Create an admin user. You can change the email and password in priv/repo/seeds.exs file.
mix run priv/repo/seeds.exs
  1. Add your Cloudinary keys. Create a file called dev.secret.exs inside config folder with the following contents. Be sure to change the 'name', 'api_key' and 'api_secret' fields.
use Mix.Config
config :cloudini,
  api_key: "CHANGE_ME",
  api_secret: "CHANGE_ME",
  name: "CHANGE_ME",
  stub_requests: false,
  http_options: [timeout: 15000]
  1. Start the server
iex -S mix phoenix.server

Now visit http://localhost:4000/ to see the frontend version. To access the admin area, visit http://localhost:4000/admin. You can login with the email and password set in priv/repo/seeds.exs.


Running tests

  1. Set up your test database
MIX_ENV=test mix ecto.reset
  1. Run all the tests on file change
mix test.watch

Todo

  • Create sitemaps
  • Cron task to update sitemaps frequently
  • Add archives page to blog
  • Create RSS feeds
  • Explore Google AMP versions for product/post pages
  • Write integration tests for admin area

Credits

The Elixir/Phoenix community is really welcoming & responsive. There are tons of nice examples and packages that helped me with my learning. Here are some of the elixir packages that I am using in this project -

  • Comeonin for password hashing
  • test.watch for running tests
  • Bamboo for sending emails
  • Cloudini for uploading images to Cloudinary
  • Quantum for running cron tasks
  • Curtail for truncating HTML snippets
  • XML builder for generating Sitemaps
  • Kerosene for pagination

For any questions/comments/suggestions, drop me a line at - [email protected] or send me a tweet.

Thanks,

Bharani, Authentic Pixels - Free & Premium Web Resources

Articles
to learn more about the elixir concepts.

Resources
which are currently available to browse on.

mail [email protected] to add your project or resources here 🔥.

FAQ's
to know more about the topic.

mail [email protected] to add your project or resources here 🔥.

Queries
or most google FAQ's about Elixir.

mail [email protected] to add more queries here 🔍.

More Sites
to check out once you're finished browsing here.

0x3d
https://www.0x3d.site/
0x3d is designed for aggregating information.
NodeJS
https://nodejs.0x3d.site/
NodeJS Online Directory
Cross Platform
https://cross-platform.0x3d.site/
Cross Platform Online Directory
Open Source
https://open-source.0x3d.site/
Open Source Online Directory
Analytics
https://analytics.0x3d.site/
Analytics Online Directory
JavaScript
https://javascript.0x3d.site/
JavaScript Online Directory
GoLang
https://golang.0x3d.site/
GoLang Online Directory
Python
https://python.0x3d.site/
Python Online Directory
Swift
https://swift.0x3d.site/
Swift Online Directory
Rust
https://rust.0x3d.site/
Rust Online Directory
Scala
https://scala.0x3d.site/
Scala Online Directory
Ruby
https://ruby.0x3d.site/
Ruby Online Directory
Clojure
https://clojure.0x3d.site/
Clojure Online Directory
Elixir
https://elixir.0x3d.site/
Elixir Online Directory
Elm
https://elm.0x3d.site/
Elm Online Directory
Lua
https://lua.0x3d.site/
Lua Online Directory
C Programming
https://c-programming.0x3d.site/
C Programming Online Directory
C++ Programming
https://cpp-programming.0x3d.site/
C++ Programming Online Directory
R Programming
https://r-programming.0x3d.site/
R Programming Online Directory
Perl
https://perl.0x3d.site/
Perl Online Directory
Java
https://java.0x3d.site/
Java Online Directory
Kotlin
https://kotlin.0x3d.site/
Kotlin Online Directory
PHP
https://php.0x3d.site/
PHP Online Directory
React JS
https://react.0x3d.site/
React JS Online Directory
Angular
https://angular.0x3d.site/
Angular JS Online Directory