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.

First Post!

zacksiri

zacksiri

First of all Congrats! on actually finishing a product and open sourcing it. I briefly read through the code base and tried out the product. Is this your first elixir app?

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

Last Post!

tyro

tyro

Hey! I’d love to hear feedback on security issues. I’ve sent you a message. :slight_smile:

Edit: and don’t worry about sounding harsh, I’m still quite new to Elixir/Phoenix.

Where Next?

Popular in Discussions Top

restack_oslo
Hello, Please pardon me for any faux paux. I am 46 and this is my first time on a forum of any kind. I wanted to to get answers from tho...
New
sergio
There’s a new TIOBE index report that came out that shows Elixir is still not in the top 50 used languages. It also goes on to call Elix...
New
PragTob
Hey everyone, this has been brewing in my head some time and it came up again while reading Adopting Elixir. GenServers, supervisors et...
New
pdgonzalez872
If this has been asked here before, please point me to where it was asked as I didn’t find it when I searched the forum. Maybe a mailing ...
New
eteeselink
Hi all, In the last days, two things happened: A blog post titled “They might never tell you it’s broken” made the rounds. It’s about ...
New
pillaiindu
I want to convert a Phoenix LiveView CRUD website to a CRUD mobile app. What do you think is the easiest way to do so?
New
AstonJ
Can you believe the first professionally published Elixir book was published just 8 years ago? Since then I think we’ve seen more books f...
New

Other popular topics Top

electic
Hi, I am new to Elixir. I am trying to use the DateTime component to insert a date into MySQL however the there seems to be no way to fo...
New
Brian
What is the proper way to load a module from a file in to IEX? In the python world, doing something like this pretty standard: from ....
New
jononomo
For some reason my phoenix channels are working for me in my local dev environment, but as soon as I deploy via Docker, I get a 403 error...
New
joeerl
Hello again - after a longish gap I’ve decided I really must dig into Elixir and see what’s been happening here - so I have a few questio...
New
sergio_101
I am VERY much an elixir newbie. I have taken one elixir course and one phoenix course on Udemy. During that course, I saw the instructor...
New
SoCreat
i’m a new one to elixir which editor can i use vs code? or atom? Thanks! :smiley:
New

We're in Beta

About us Mission Statement