This will be a small strawpoll clone, that will not have the authentication features since I suck at that. This is an educational project that will eventually be hosted.
The backend is based on scala-pet-store. The frontend is based on Reason's QuickStart, which I normally don't use (I use Reason Scripts).
Scala has an amazing backend ecosystem, while Reason is amazing on the frontend, which is why I chose them for their respective roles. Reason is not yet mature enough to attract beginners for its backend usage. However, for the frontend, it feels much more natural to use than Scala.js for a JavaScript programmer like me.
Doing it pretty much from top to bottom.
- UI
- New Poll
- Vote
- Results
- Duplicate Votes Checker
- IP Addr. Checking
- Browser Cookie Checking
- Auth
- Public vs Private Polls
- Allow Public Polls to be in a "Trending" section. That'd be cool
Backend:
- http4s, cats, doobie, circe
Frontend:
- reason-reroute
Strategies:
- short-polling for now
Shell 1:
sbt
# Shell will pop up, and these commands will be very useful:
# reload on save: reStart
# lint: scalafmt
Shell 2:
yarn && yarn start # npm install && npm run start
Shell 3:
yarn webpack # npm run webpack
And then go to localhost.