DEV Community

george_pollock
george_pollock

Posted on • Originally published at hvitis.dev on

Django 2 CRM App for Polish Language Courses - PayPal and Stripe

Why you should not think too much about stack

Background story 📢

The Journey with https://lekcja.online has started almost a year ago. When I was talking with my friend about what has he been up to lately. He was unhappy working in a Law Office and I was thinking about different stacks / tools to learn. He explained me how he teaches using online platforms that help him find students and how they cut fifth (or somthing like that - a lot, for sure) of what he earns. While he was busy keeping up with his passion of teaching my native language, I picked Django 2, I did some basic apps (blog, todo list etc) and I decided that this would be a nice tool for building the idea. What’s the idea you may ask?

Idea ⚡️

The idea was basically to see if people would like to pay for online content-like courses of polish languages. To validate this idea you could just create an account on some popular CRM platform for teaching online and add your content there. Why didn’t he go for this solution? Because it was just an idea. He had 0 coourses, so this was a matter of moving all Google Docs full of unorganized materials to any platform which in his case could take time.

Execution 🔨

  1. First I made a trello board. A software project without a board is like a screw without a wrench - you can implement it with your hands but it will take more time. Nothing will help you to clear your mind and organize time like a good KanBan / SCRUM board. Since it was a side project I was just using kanban.

Then I defined a set of User Stories divided into:

  • OWNER (my friend)
  • TEACHER (initially my friend)
  • STUDENTS (all other USERS)

some examples:

As a USER I am allowed to access only content with certain permissions.

As an OWNER I want to be able to add TEACHERs to the Admin Panel

As an OWNER I want to be able to see the Payments

As a TEACHER I want to be able to add new Lesson to the Course

As a TEACHER I want to be able to subtract amount of lessons available

As a STUDENT I want to be able to buy private lessons pack using PayPal

As a STUDENT I want to be able to subscribe for different courses packs using Stripe

etc. My friend was not at all aware of Software Development so he was a typical client. You can imagine that I had a pretty long list of requirement to be done by yesterday. I had more than 30 User Stories, most of them were pretty beefy (like subscriptions for courses integrated with Stripe ) I noted everything and started prioritizing (again, trello!)

Good Foundation

Why is it necessary to start off with User Stories ? ==> Time!

Basically if you don’t think ahead then future changes in the project may be really painful to implement (if not impossible). Especially if you are a beginner. For instance I had very little knowledge of SQL Databases so making changes in Courses subscription structure could require pretty nasty DB operations that I was not able to handle. So to be sure that I will be able to finish what I’ve started I needed those US like Robinson Cruzoe needed his coconut. There are some other important info like documenting or having a general idea of the process. You can check out great article on basics of MVP.

Study, Study, Study!

I was a Django 2 Beginner but I knew that finishing this project would significantly develop my skills. What did I do in order to achieve this?

  • I’ve invested in 4 Udemy Django courses, went through all of them,
  • I’ve searched for hundreds Django pip packages, investigated some of them from code perspective, upgraded few of them from Django 1
  • Went through thousands of StackOverflow issues,
  • Went through (probably) half of the official docs (Amazing docs!)
  • I’ve watched tens of hours worth of YouTube tutorials on Django (mostly advanced topics like integrations, PayPal, DB Schemes)
  • And finally - I solved many problems that were not found in any tutorials, for example Subscription form persistent on each page.

alt text

Technical stuff 💾

The project is entirely MVC based. There is no API that is provided by the server. Including the payments that are provided by PayPal and Stripe. They work with automatically generated buttons and specific views prepared for receiving information from the payments provider.

So far we are not using AJAX, the exercised available in the Lessons are just pure JS scripts working on the front. Maybe in the future if we find a UseCase for saving Users’ responses I will try to implement it.

The styling comes from free Bootstrap template.

What did I gain from all of this?

Obviously I learned how to Use Django 2, gained very firm basis for using Django Rest Framework and I´m using this knowledge now. Having a big picture I can firmly say that Django is a great tool for validating StartUps and any Bootstrap ideas since for an experiences person it wont take long time to build an MVP. Django has many packages for virtually anything you need. Shops, Maps, CRM, etc. and if you can´t find it or you need to be more flexible you can still use Django as your backend with REST package. This way you can use Django Admin which is very powerful (managing permissions, groups, visual data representation)

Beside that I’ve learned quite a lot of JavaScript since it’s always useful for some FrontEnd validations and in my case for making scripts for exercises.

And last but not least I’ve strengthen my friendship by helping a friend! 💪🚴 Check out his page: https://lekcja.online

alt text

Top comments (0)