I am playing with technology and trying new things. Because JIRA does not provide such functionality out of the box, I would like to develop SPA to play it with my team. I am aware about tons of similar products existing in this area (all are paid!), never seen any of them, and actually the work I do here is mostly for my personal skills development.
Directory tree ============== [-] PlanningPoker |--[+] __pycache__ |--[-] backend <--- backed code | |--[+] __pycache__ | |----- __init__.py | |----- config.py | `----- main.py <---------------- main.py |--[+] planningpoker |--[-] pp-front <-- UIx project, created with: | |--[+] dev npx create-uix-app@latest pp-front --re-frame` | |--[+] node_modules | |--[+] public | |--[-] src | | `--[-] app | | |----- core.cljs <--- function of FrontEnd | | |----- core.css | | |----- db.cljs | | |----- fx.cljs | | |----- handlers.cljs | | |----- hooks.cljs | | `----- subs.cljs | |----- LICENSE.md | |----- README.md | |----- deps.edn | |----- package.json | |----- shadow-cljs.edn | `----- yarn.lock |--[+] static |--[-] templates | `----- index.html |--[+] tests |----- README.org <----- mode Source of this README.html |----- __init__.py |----- bb.edn <----- for commands |----- poetry.lock `----- pyproject.toml
- [X] FastAPI on Backend
- [X] UIX^2 on Frontend
- [X] .env configuration
- [X] Local memory caching for retrieved Jira data
- [X] Websocket for group actions
- [X] Logging screen on frontend (from websocket log)
- [X] “Vote accepted from …”
- [X] “User … logged in”
Backend:
poetry install
Copy & edit contents of .env file: setup variables
cp .env-example .env
To do this you will need to create Google Project and obtain Oauth authorization keys.
Variable name | Documentation |
---|---|
GOOGLE_CLIENT_ID | Google Oauth credentials |
GOOGLE_CLIENT_SECRET | |
SECRET_KEY | Secret key, must be specified |
ALLOWED_EMAIL_DOMAINS | Restrict domains list (for example list here only organization domains). If empty - all domains are allowed |
poetry run fastapi dev backend/main.py
(if you have babashka installed):
bb run fastapi
- State “WORKING” from “IDEA” [2024-08-17 Sat 08:05]
- State “IDEA” from “TODO” [2024-08-17 Sat 08:05]
- State “TODO” from [2024-08-17 Sat 07:55]
- State “WORKING” from [2024-10-06 Sun 08:20]
After first real play the improvements are in the list below.
- State “DONE” from “TODO” [2024-10-06 Sun 09:45]
- State “DONE” from “WORKING” [2024-10-07 Mon 08:25]
- State “WORKING” from “TODO” [2024-10-06 Sun 20:40]
- State “TODO” from [2024-10-06 Sun 08:30]
- State “DONE” from [2024-09-22 Sun 13:15]
- State “DONE” from “WORKING” [2024-08-17 Sat 20:05]
- State “WORKING” from “DONE” [2024-08-17 Sat 11:20]
- State “DONE” from “TODO” [2024-08-17 Sat 11:15]
- State “TODO” from [2024-08-17 Sat 07:55]
- [X] Decided to use FastCGI instead of Kit in this round ([2024-08-17 Sat 11:20]). Reasons:
- I already know how to use Jira integtration with Python
- I want to gain some FastAPI experience
- [X] How to add ReFrame? 11:29.44 (00:08) Found, explained in: https://github.com/pitch-io/uix-starter
npx create-uix-app@latest my-app --re-frame # adds re-frame setup
- [X] View (again) intro video from Roman Liutikov
- [X] Re-try modern React tutorial
- [X] Start learning Udemy React course, take some first lessons
- State “DONE” from “TODO” [2024-08-25 Sun 15:05]
- State “TODO” from [2024-08-17 Sat 08:10]
- https://google-auth.readthedocs.io/en/master/
- https://github.com/hanchon-live/tutorial-fastapi-oauth
- https://blog.hanchon.live/guides/google-login-with-fastapi/ (following)
- https://docs.authlib.org/en/latest/client/starlette.html (works)
- State “DONE” from “TODO” [2024-09-15 Sun 14:55]
- State “TODO” from [2024-08-17 Sat 08:10]
- FastAPI provides support:
- State “REJECTED” from [2024-09-22 Sun 13:10]
- State “TODO” from [2024-08-17 Sat 08:10]
- SPA - one screen on UIx
- [ ] List logged in users
- [ ] Set color for facilitator?
- how to agree who is facilitator? may be anyone can? probably yes, but then warn on top who started it
- [ ] Countdown timer (configuration for length) starts
- [ ] List of SPs (configuration)
- [ ] Strike for users who voted
- [ ] Reveal cards with some visual effect
- State “DONE” from “TODO” [2024-08-25 Sun 07:05]
- State “TODO” from [2024-08-17 Sat 08:20]
- [X] Install fastapi via poetry
- [X] Bootstrap UIX^2 project
- [X] Add/commit to git
- [ ] Publish on github
- State “DONE” from “TODO” [2024-08-25 Sun 07:05]
- State “TODO” from [2024-08-17 Sat 08:25]
- State “DONE” from “WORKING” [2024-08-27 Tue 06:15]
- State “WORKING” from “TODO” [2024-08-25 Sun 15:05]
- State “TODO” from [2024-08-25 Sun 12:10]
- Finish watching Babashka tasks (by Michiel Borkent) from The London Clojurians are happy to present 3 years ago
- State “DONE” from “TODO” [2024-09-18 Wed 09:10]
- State “TODO” from [2024-09-17 Tue 15:20]
- State “DONE” from “WORKING” [2024-09-17 Tue 20:45]
- State “WORKING” from “TODO” [2024-09-17 Tue 14:30]
- State “TODO” from [2024-09-17 Tue 09:35]
- State “TODO” from “DONE” [2024-09-16 Mon 20:40]
- State “DONE” from “WORKING” [2024-09-15 Sun 15:15]
- State “WORKING” from “TODO” [2024-08-25 Sun 15:05]
- State “TODO” from [2024-08-25 Sun 07:05]
- [X] Make a stub function on FastAPI side for now.
- [X] Select library to make HTTP calls.
A) Trying https://github.com/lambdaisland/fetch
B) [X] (this is an alternative to try) https://github.com/r0man/cljs-http?tab=readme-ov-file
GET https://api.github.com/users?since=135 User-agent: emacs
- [2024-08-27 Tue 09:25] I am having difficulties to connect async nature of core-async channels (same as promises?) to the actual useEffect or anything. Reading…
C) some people suggest to use Axios directly from Clojurescript.
- [X] Display nice formatted results
- [X] Do a call via function
- [X] Connect results it via
use-effect
or somehow else? Read docs and do! - [X] Fine tune the display results
- [X] Show estimates column
- [X] Limit to a project via settings
- [X] Add button to ticket details & estimation process
- [X] Logout button
- [X] Switch to voting screen
- [X] Async python function with results caching on FastAPI / (memoize | Redis)
- [X] avoid 2 staged query/re-render for search term ‘payment`
- [X] solution: implement same structure (as for saving comment) for searching after delay only! user need to stop typing to see results!
- [X] indicate that query is running, also which query is running! with a color and sticker! and some effect!
- [ ] (low pri) May be make a list of previous queries to be able to re-run them
- [ ] use python pickle!
- [ ] (low pri) Provide a list of pre-defined queiries on app start or save them to a file and then restore
- State “DONE” from “TODO” [2024-09-15 Sun 15:30]
- State “TODO” from [2024-09-08 Sun 12:55]
- State “DONE” from “TODO” [2024-09-20 Fri 08:00]
- State “TODO” from [2024-09-20 Fri 07:40]
- State “DONE” from “TODO” [2024-09-17 Tue 07:30]
- State “TODO” from [2024-09-16 Mon 09:55]
- [X] Log display as is-info
- [X] Or display N lines with timestamp and history scroll
- [X] disappear after 1-3 seconds with fade out effect!
- [X] delete individual message
[ ] display not more then 3 messages
- State “DONE” from “WORKING” [2024-09-22 Sun 13:10]
- State “WORKING” from “TODO” [2024-09-05 Thu 09:25]
- State “TODO” from [2024-08-28 Wed 23:25]
- [X] Menu is-active
- [X] Prepare FastAPI endpoint
- [X] Cache ticket data
- [X] Display data on screen
- [2024-09-06 Fri 09:25] data is displayed but
markdown
formatting is required… - [X] format markdown (on backend?)
- [X] format URLs via custom fn
- [X]
(maybe) format images as external URLs via custom fn?- got Permission denied!
- [2024-09-06 Fri 09:25] data is displayed but
- [X] Add ‘vote’ layout block
- [X] Set voted ticket & bg color for button
- [X] Send vote data to server
- [X] add backend endpoint
- [X] store data in dict. use pickle?
- [X] add fx handler event
[ ] we also need to send POST on estimation start!we already have info- [X] send data only if value has changed!
- [X] add backend endpoint
[ ] Countdown timer for voting (configure the length via .env)no need, can be replaced by ‘finish’- [X] Indication who has started voting.
- [X] Indication of people which finished voting -
list.log - [X] Reveal results
- [X] Fix red/yellow colors for big estimates, add for hours too
- [X] Fix estimate restart
- [X] Rewrite widget to split voting into 3 categories: Frontend, Backend and QA
- [X] Splitting into categories in voting box & backend
- [X] Splitting into categories in results box
- [X] Make it possible to choose: SP or Hours
- [X] Send results to Jira by adding formatted comment to ticket like (in hours):
Back: ... Front: ... QA: ...
- [X] How to reset use-state data when voting restarts?
check logged in state (when in /app
) and other statuses (because currenly it allows to see /app/
[1/2]
- State “DONE” from “TODO” [2024-09-17 Tue 20:50]
- State “TODO” from “REVIEW” [2024-09-15 Sun 08:45]
- State “REVIEW” from [2024-09-15 Sun 08:45]
- [X] make ‘sync’ / ‘status’ query.
- State “DONE” from “TODO” [2024-09-22 Sun 09:50]
- State “TODO” from [2024-08-28 Wed 23:25]
- [X] Add WS handler on backend, check it works with sample HTML code
- [X] pub/sub pattern on FastAPI backend:
- https://pypi.org/project/fastapi-websocket-pubsub/
- https://gist.github.com/appeltel/fd3ddeeed6c330c7208502462639d2c9
- https://github.com/6ixOnline/fastapi-pubsub
- tired from non-working examples. switching to a well known path with aioredis https://aioredis.readthedocs.io/en/latest/#installation
- https://gist.github.com/charsyam/1efc7f38860225c63b05379fffe73256
- https://medium.com/@nandagopal05/scaling-websockets-with-pub-sub-using-python-redis-fastapi-b16392ffe291
- [X] https://github.com/Thierry46/pubsub (Looks good, embedding it!) [2024-09-11 Wed 07:55]
- fastapi/fastapi#258
- [X] Add WS support on cljs side
- [2024-09-14 Sat 15:35] got tired by implementing websocket coordination but it finally works
- [ ] auto reconnect web socket?!!
- [X] send current screen info after auto reconnect/connect!
- [X]
‘sync’ button to reconnect websocket (red/green/auto reconnect)can use Home! - [X] Synhronize current screen
- add ‘app-state’ endpoint - we will check this after login/on app load because async user can do anything async
- react to ws messages online - e.g. commands:
[ ] Goto screen <name>- [X] Vote for ticket <jira id>
- [X] Voting finished (works for manual finish too)
- [X] User logged in: (<username>)
- [X] Online members (16): A, B, C
- [X] Display voting results when ‘voting finished’ received
- [X] Listen & display online members (log)
- [X] websocket for logging updates!