Nicd

Nicd

I hope this is ok to share in this section. :slight_smile:

I have made a coding statistics website with Elixir and Phoenix. The basic idea is that when you write code, you get experience points and then you level up (like in an RPG). You can see how much you have “experience” in different languages and on different machines you use. It’s open source and free to use. Currently only Atom editor and JetBrains IDEs are supported (the API is documented, though, if you want to add editor support!).

Here is the index page: https://codestats.net/ and as an example, here is my profile page: https://codestats.net/users/Nicd.

It is a pretty standard Phoenix website. I use ETS for caching some data locally (it runs on one node) and store per-user cached data using PostgreSQL’s JSON field. Both profile pages and the index page are live updated while you code using Phoenix channels, and Elm in the frontend (it looks roughly like this, though the index page UI has since changed a bit).

In the future I plan to add more different statistics and other fun features.

All the code is licensed under 3-clause BSD, you can find the sources for the site, Atom plugin and JetBrains plugin respectively here:

It’s my second ever production Phoenix site, and first ever Elm project, Atom plugin and JetBrains plugin, so the code will reflect that. I would appreciate any feedback so I can become better. :slight_smile:

Showing Posts 15 to 6

Nicd

Nicd OP

6 years on, Code::Stats is still there and being updated. I just pushed release 2.3.0 (and 2.3.1 to fix issues) that has “flow state” tracking that tries to measure how much time you spent in a coding flow, i.e. a very focused state.

The profile page was rewritten in Phoenix LiveView, so I don’t have to spend time writing APIs and duplicate code for the frontend live updates. It was a great feeling getting to delete all those JS files! Chart.js still remains for rendering a couple of more complex charts. You can see the new profile page here: Nicd – Code::Stats

This version also birthed one Hex package, to get colours of programming languages to display in the charts: LanguageColours - Get colours for programming languages

Everything is still (and will be!) open source, so feel free to check it out. But of course it has been evolving for 6 years now and I was a much worse Elixir programmer back then, so it’s a mish mash of different styles and different experiments… :slight_smile:

Nicd

Nicd OP

In the end it was about productivity. Elm was interesting and new but I was very slow with it. As I have limited time to work on this project, I went with a more pragmatic solution. I have been thinking of looking at ReasonML though, at least for some project.

cmkarlsson

cmkarlsson

Interested to know why this change?

Nicd

Nicd OP

https://twitter.com/code_stats/status/1013229785139548160

2.0 was released just now. It has a new UI, new graphs, Elm was replaced with RE:DOM, it has a GraphQL API written with Absinthe, and finally Distillery releases! It’s also a big quality of life upgrade on the backend so hopefully new releases should be much easier to make from this point forward. Still totally free to use!

Architect

Architect

There is a cool android app to check the stats:

https://play.google.com/store/apps/details?id=com.geekapps.codetrack

Nicd

Nicd OP

We now have Vim support! It has been tested by a couple of people but I’m not a Vim user so if you have issues, please report them to us. :slight_smile:

Nicd

Nicd OP

So after about 1.5 years in production, Code::Stats has just passed the 1000 user mark and we’re working on improving it. :slight_smile:

Since the first post, we have added integrations for Sublime Text 3, Visual Studio Code, Visual Studio (still some bugs to iron out), and Zsh. We also have a plugin in the works for Vim - if you’d like to help test it, you can contact us on our Gitter, Matrix, or IRC channels.

On the website side we’re working on a 2.0 version that will have a complete UI rewrite with RE:DOM (in place of Elm) and CSS Grid. The backend is updated to Phoenix 1.3 and refactored into a context-ish style (still learning this). Currently I’m working on a new profile API using GraphQL via Absinthe.

Of course it’s still all free to use and open source. :slight_smile: The sources have moved to GitLab, so you can follow our progress here: CodeStats · GitLab

Nicd

Nicd OP

Elm was… interesting. I have never used Haskell or another ML and Elixir was my first functional language. So it took me a while to really grok the Elm syntax and what was happening. I still have only a faint idea about some of the things but most of it is clear now.

It lived up to its reputation in that when my frontend apps finally compiled, they really did work as expected. I didn’t really get to enjoy any productivity boosts from that though, since doing anything was very very slow (but it was my first try ever). I liked the builtin virtual DOM library, but I was kind of disappointed that it’s not possible to have Elm parse the existing DOM and change that (have to render the whole thing from scratch).

All in all it was a fun learning experience and I look forward to seeing how it develops.

AstonJ

AstonJ

Nice one! Looks neat :023:

If you get a minute, please do a write-up on you Elm-Elixir experience - there is certainly a lot of love for Elm in the Elixir community :slight_smile:

Nicd

Nicd OP

At the moment, 220.

Where Next? Top

Trending in Discussions Top

AstonJ
As the title says, please share what you’ve been up to with Elixir. Whether that’s been learning it, looking into it, making stuff with i...
2977 94592 917
New
cblavier
Hey there, It’s been more than a year since we started using LiveView as our main UI library and building a whole library of UI componen...
New
mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
heathen
Quite interesting article Google brought me. Didn’t find any mentions about it here. What do you think in general? Would you use togethe...
New
mhanberg
Hi everyone! The first release candidate for the Expert language server project is now available! We’ve published a press release detai...
New
axelson
Hi there! :wave: @frigidcode and I (but mostly him) have been running an Elixir Book club, we’re almost done with Designing Elixir Syste...
New
budgie
A little off-topic, but I feel like people here have a good head on their shoulders. I used to be quite good at making software. Was luc...
New

Other Trending Topics Top

GenericJam
Edit: 2026 May 15 - This post is archived. Mob is alive!! Main docs: mob v0.7.11 — Documentation A bit of explanation for the slightly c...
New
JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
marciok
Hi there! We created Gust: A task orchestrator inspired by Airflow. For those who have never heard about Aiflow, it’s a Python-based wor...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
georgeguimaraes
Just published claude-code-elixir, a plugin marketplace for Claude Code with Elixir support. These are the plugins I’ve been using for my...
New
Dmk
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews