tyro

tyro

Sceopa - an open source blogging platform

Hello!

I’ve created Sceopa, a free, open source blogging platform in Phoenix/Elixir. It allows anyone to sign up and create new blog posts in seconds. My aims are:

  • fast and responsive on all devices (my phone is super slow :weary:)
  • to allow quick creation of technical blog posts (markdown/syntax highlighting are supported)
  • minimal design (distraction-free articles)
  • clear and simple code
  • to learn from your feedback!

Sceopa is now live here.

The source code can be found on GitLab here.

I’m still quite new to Phoenix/Elixir so any feedback/tips/suggestions would be fantastic. Have some tips to improve the code? Or the UX? A new feature you want to see? Let me know! And feel free to submit issues/pull requests. :smiley:

Edit: And here’s an example post on the site so you can see what they look like.

Most Liked

tyro

tyro

Just an update, I’ve added support for uploading/download posts via JSON. For more info see here: https://sceopa.com/posts/17

ps. If anyone wants to look at the code for this feature (or code review it which would be awesome :slight_smile:) you can see the commit here: Add support for uploading multiple posts from json file (793fa9e3) · Commits · James Long / sceopa · GitLab, the main function is:

  def import_posts(user, file) do
    with {:ok, contents} <- File.read(file.path),
         {:ok, %{"posts" => posts}} <- Poison.decode(contents),
         {:ok, _results} <-
           posts
           |> Enum.map(fn params ->
             assoc = build_assoc(user, :posts)
             Post.changeset(assoc, params)
           end)
           |> Enum.with_index()
           |> Enum.reduce(Multi.new(), fn {changeset, index}, multi ->
             Multi.insert(multi, index, changeset)
           end)
           |> Repo.transaction(),
      do: {:ok}
  end
tyro

tyro

Well as far as learning Elixir goes, I’ve been working through quite a few exercism exercises which have helped. I’m still very much a noob when it comes to OTP but am working through Elixir in Action to help with this. Overall I think there are a lot of good learning resources out there for the core language.

The two main difficulties I had were I guess the standard ones:

a) lack of libraries

e.g. For this project I wanted to have server-side syntax-highlighting. There are good libraries for this in python, haskell, and ruby, but not elixir (I ended up using Pandoc for this which is written in Haskell).

b) deployment

Setting up Heroku deployment and SSL was a bit of a pain, but mainly because I’m new to this. There are elixir/phoenix buildpacks for Heroku which are very helpful.

hlx

hlx

Use the force of Pattern Matching you much (or at least try ;))

above can be written as

defp put_email_key(%Ecto.Changeset{valid?: false} = changeset), do: changeset
defp put_email_key(%Ecto.Changeset{valid?: true} = changeset) do
  put_change(changeset, :email_verification_key, gen_email_key())
end

Where Next?

Popular in Discussions Top

matthias_toepp
I’d love to hear what people think about Wisp, the new Gleam web framework started by Gleam’s primary creator Louis Pilfold. Gleam, alon...
New
Donovan
Hello everyone, I’m so glad to have discovered this awesome community. Thanks for creating it! This is my second post, and apologies for...
New
arcanemachine
https://nitter.net/josevalim/status/1744395345872683471 https://twitter.com/josevalim/status/1744395345872683471
New
nburkley
AWS re:Invent is on at the moment with some interesting announcements. One new feature in particular is the Lambda Runtime API for AWS La...
New
AstonJ
If a newbie asked you about Phoenix Contexts, how would you explain the basics to them? Feel free to be as concise or in-depth as you li...
New
rms.mrcs
A couple of days ago I was discussing with a friend about different approaches to write microservices. He said that if he was going to w...
New
chulkilee
Here are the list of HTTP client libraries/wrappers, and some thoughts on HTTP client in general. I’d like to hear from others how they w...
New
joeerl
I’m playing with Elixir - It’s fun. I think @rvirding does give Elixir courses these days. Re: files and database - when I given Erlang ...
New
scouten
I’m looking for a host for the server part of a small (personal) side project that I’m working on. It’s currently written in Node.js and ...
New
Markusxmr
Since Drab has been developed for a while in the open, introducing the Liveview functionality in a way it happend appears to undermine th...
New

Other popular topics Top

gshaw
What is the idiomatic way of matching for not nil in Elixir? E.g., First way: defp halt_if_not_signed_in(conn, signed_in_account) when...
New
dokuzbir
I want to highlight html closing tags when i click a html tag. That works in .html files but doesnt work for html.eex templates. How can...
New
jason.o
In the code below, if the create action is not set to accept “extra_key” as an input, it errors out with a message shown above. Is there ...
New
saif
Hello everyone, Long time lurker first time poster here. I’ve recently begun working on Elixir full-time again! :raised_hands: It’s been...
New
KronicDeth
Elixir plugin for JetBrain’s IntelliJ Platform (including Rubymine) This is a plugin that adds support for Elixir to JetBrains IntelliJ...
289 36128 110
New
romenigld
I am trying to run a deploy with docker and I successfully runned with this command: docker build -t romenigld/blog-prod . but when I t...
New
klo
Got a question about when to concat vs. prepending items to list then reversing to achieve appending. So i know lists boil down to [1 | ...
New
joaquinalcerro
Hi there, I am working with Ecto-Postgresql and I need to call all of the records from a specific table but the table has 40,000 records...
New
hariharasudhan94
I would like to know what is the best IDE for elixir development?
New
Qqwy
Update: How to use the Blogs &amp; Podcasts section You can post links to your blog posts or podcasts either in one of the Official Blog...
3271 126479 1222
New

We're in Beta

About us Mission Statement