# Improving existing project with proper domain modeling

**URL:** <https://forums.fsharp.org/t/improving-existing-project-with-proper-domain-modeling/3332>\
**Category:** General\
**Tags:** beginners\
**Created:** [September 6, 2023, 8:25pm UTC](https://forums.fsharp.org/t/improving-existing-project-with-proper-domain-modeling/3332 "2023-09-06T20:25:32Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![DigitalAXPP](https://yyz2.discourse-cdn.com/flex030/user_avatar/forums.fsharp.org/digitalaxpp/32/1243_2.png) [@DigitalAXPP](https://forums.fsharp.org/u/DigitalAXPP)\
**Post date:** [September 6, 2023, 8:25pm UTC](https://forums.fsharp.org/t/improving-existing-project-with-proper-domain-modeling/3332/1 "2023-09-06T20:25:32Z")

</div>

Dear F# Community,  
Years ago I wrote a PowerShell module to create Json Web Tokens: [jwtPS](https://github.com/DigitalAXPP/jwtPS). The whole project was written in its first version completely in PowerShell. I re-wrote the project roughly two years later in F#. I, unfortunately, have little experience with software architecture and wrote it without any preliminary planning. I am at a point where everything works but I would like to create a domain driven design. I have seen some beautiful examples on Youtube videos or other blogs ([Why you should model your domain with F# - Viktor Andersson](https://viktorvan.github.io/fsharp/domain-modeling-with-fsharp/)) but I struggle to translate it to my project (jwtPS).

Does somebody have any tips what I should change in the project to improve the domain design?

---

<div class="post-metadata">

**Author:** ![altbodhi](https://yyz2.discourse-cdn.com/flex030/user_avatar/forums.fsharp.org/altbodhi/32/1253_2.png) [@altbodhi](https://forums.fsharp.org/u/altbodhi)\
**Post date:** [October 18, 2023, 4:58am UTC](https://forums.fsharp.org/t/improving-existing-project-with-proper-domain-modeling/3332/2 "2023-10-18T04:58:28Z")

</div>

[https://github.com/DigitalAXPP/jwtPS/blob/main/src/jwtTypes.fs](https://github.com/DigitalAXPP/jwtPS/blob/main/src/jwtTypes.fs) in this module i see not only types but also many functions. maybe it need move to utils.fs?
