[
  {
    "path": ".eslintrc.js",
    "content": "// This configuration only applies to the package manager root.\n/** @type {import(\"eslint\").Linter.Config} */\nmodule.exports = {\n  ignorePatterns: [\"apps/**\", \"packages/**\"],\n  extends: [\"@repo/eslint-config/library.js\"],\n  parser: \"@typescript-eslint/parser\",\n  parserOptions: {\n    project: true,\n  },\n};\n"
  },
  {
    "path": ".gitignore",
    "content": "# Dependencies\nnode_modules\n.pnp\n.pnp.js\n\n# Local env files\n.env\n.env.local\n.env.development.local\n.env.test.local\n.env.production.local\n\n# Testing\ncoverage\n\n# Turbo\n.turbo\n\n# Vercel\n.vercel\n\n# Build Outputs\n.next/\nout/\nbuild\ndist\n\n# Debug\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\n\n# Misc\n.DS_Store\n*.pem\n\n# Byte-compiled / optimized / DLL files\n__pycache__/\n*.py[cod]\n*$py.class\n\n# Unit test / coverage reports\nhtmlcov/\n.tox/\n.nox/\n.coverage\n.coverage.*\n.cache\nnosetests.xml\ncoverage.xml\n*.cover\n*.py,cover\n.hypothesis/\n.pytest_cache/\ncover/\n\n# Environments\n.venv"
  },
  {
    "path": ".npmrc",
    "content": ""
  },
  {
    "path": ".vscode/next-fast-turbo.code-workspace",
    "content": "{\n  \"folders\": [\n    {\n      \"name\": \"Frontend\",\n      \"path\": \"../apps/web\"\n    },\n    {\n      \"name\": \"API\",\n      \"path\": \"../apps/api\"\n    },\n    {\n      \"name\": \"Documentation\",\n      \"path\": \"../apps/docs\"\n    },\n    {\n      \"name\": \"Root\",\n      \"path\": \"../\"\n    }\n  ],\n  \"extensions\": {\n    \"recommendations\": [\"joshx.workspace-terminals\"]\n  },\n  \"launch\": {\n    \"version\": \"0.2.0\",\n    \"configurations\": [],\n    \"compounds\": [\n      {\n        \"name\": \"Launch Frontend and Backend\",\n        \"configurations\": [\"Next.js: Chrome\", \"Python: FastAPI\"]\n      }\n    ]\n  }\n}\n"
  },
  {
    "path": ".vscode/settings.json",
    "content": "{\n  \"eslint.workingDirectories\": [\n    {\n      \"mode\": \"auto\"\n    }\n  ],\n  \"python.testing.pytestArgs\": [\"apps\"],\n  \"python.testing.unittestEnabled\": false,\n  \"python.testing.pytestEnabled\": true,\n  \"cSpell.enableFiletypes\": [\"mdx\"]\n}\n"
  },
  {
    "path": "LICENCE",
    "content": "                    GNU GENERAL PUBLIC LICENSE\n                       Version 3, 29 June 2007\n\n Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>\n Everyone is permitted to copy and distribute verbatim copies\n of this license document, but changing it is not allowed.\n\n                            Preamble\n\n  The GNU General Public License is a free, copyleft license for\nsoftware and other kinds of works.\n\n  The licenses for most software and other practical works are designed\nto take away your freedom to share and change the works.  By contrast,\nthe GNU General Public License is intended to guarantee your freedom to\nshare and change all versions of a program--to make sure it remains free\nsoftware for all its users.  We, the Free Software Foundation, use the\nGNU General Public License for most of our software; it applies also to\nany other work released this way by its authors.  You can apply it to\nyour programs, too.\n\n  When we speak of free software, we are referring to freedom, not\nprice.  Our General Public Licenses are designed to make sure that you\nhave the freedom to distribute copies of free software (and charge for\nthem if you wish), that you receive source code or can get it if you\nwant it, that you can change the software or use pieces of it in new\nfree programs, and that you know you can do these things.\n\n  To protect your rights, we need to prevent others from denying you\nthese rights or asking you to surrender the rights.  Therefore, you have\ncertain responsibilities if you distribute copies of the software, or if\nyou modify it: responsibilities to respect the freedom of others.\n\n  For example, if you distribute copies of such a program, whether\ngratis or for a fee, you must pass on to the recipients the same\nfreedoms that you received.  You must make sure that they, too, receive\nor can get the source code.  And you must show them these terms so they\nknow their rights.\n\n  Developers that use the GNU GPL protect your rights with two steps:\n(1) assert copyright on the software, and (2) offer you this License\ngiving you legal permission to copy, distribute and/or modify it.\n\n  For the developers' and authors' protection, the GPL clearly explains\nthat there is no warranty for this free software.  For both users' and\nauthors' sake, the GPL requires that modified versions be marked as\nchanged, so that their problems will not be attributed erroneously to\nauthors of previous versions.\n\n  Some devices are designed to deny users access to install or run\nmodified versions of the software inside them, although the manufacturer\ncan do so.  This is fundamentally incompatible with the aim of\nprotecting users' freedom to change the software.  The systematic\npattern of such abuse occurs in the area of products for individuals to\nuse, which is precisely where it is most unacceptable.  Therefore, we\nhave designed this version of the GPL to prohibit the practice for those\nproducts.  If such problems arise substantially in other domains, we\nstand ready to extend this provision to those domains in future versions\nof the GPL, as needed to protect the freedom of users.\n\n  Finally, every program is threatened constantly by software patents.\nStates should not allow patents to restrict development and use of\nsoftware on general-purpose computers, but in those that do, we wish to\navoid the special danger that patents applied to a free program could\nmake it effectively proprietary.  To prevent this, the GPL assures that\npatents cannot be used to render the program non-free.\n\n  The precise terms and conditions for copying, distribution and\nmodification follow.\n\n                       TERMS AND CONDITIONS\n\n  0. Definitions.\n\n  \"This License\" refers to version 3 of the GNU General Public License.\n\n  \"Copyright\" also means copyright-like laws that apply to other kinds of\nworks, such as semiconductor masks.\n\n  \"The Program\" refers to any copyrightable work licensed under this\nLicense.  Each licensee is addressed as \"you\".  \"Licensees\" and\n\"recipients\" may be individuals or organizations.\n\n  To \"modify\" a work means to copy from or adapt all or part of the work\nin a fashion requiring copyright permission, other than the making of an\nexact copy.  The resulting work is called a \"modified version\" of the\nearlier work or a work \"based on\" the earlier work.\n\n  A \"covered work\" means either the unmodified Program or a work based\non the Program.\n\n  To \"propagate\" a work means to do anything with it that, without\npermission, would make you directly or secondarily liable for\ninfringement under applicable copyright law, except executing it on a\ncomputer or modifying a private copy.  Propagation includes copying,\ndistribution (with or without modification), making available to the\npublic, and in some countries other activities as well.\n\n  To \"convey\" a work means any kind of propagation that enables other\nparties to make or receive copies.  Mere interaction with a user through\na computer network, with no transfer of a copy, is not conveying.\n\n  An interactive user interface displays \"Appropriate Legal Notices\"\nto the extent that it includes a convenient and prominently visible\nfeature that (1) displays an appropriate copyright notice, and (2)\ntells the user that there is no warranty for the work (except to the\nextent that warranties are provided), that licensees may convey the\nwork under this License, and how to view a copy of this License.  If\nthe interface presents a list of user commands or options, such as a\nmenu, a prominent item in the list meets this criterion.\n\n  1. Source Code.\n\n  The \"source code\" for a work means the preferred form of the work\nfor making modifications to it.  \"Object code\" means any non-source\nform of a work.\n\n  A \"Standard Interface\" means an interface that either is an official\nstandard defined by a recognized standards body, or, in the case of\ninterfaces specified for a particular programming language, one that\nis widely used among developers working in that language.\n\n  The \"System Libraries\" of an executable work include anything, other\nthan the work as a whole, that (a) is included in the normal form of\npackaging a Major Component, but which is not part of that Major\nComponent, and (b) serves only to enable use of the work with that\nMajor Component, or to implement a Standard Interface for which an\nimplementation is available to the public in source code form.  A\n\"Major Component\", in this context, means a major essential component\n(kernel, window system, and so on) of the specific operating system\n(if any) on which the executable work runs, or a compiler used to\nproduce the work, or an object code interpreter used to run it.\n\n  The \"Corresponding Source\" for a work in object code form means all\nthe source code needed to generate, install, and (for an executable\nwork) run the object code and to modify the work, including scripts to\ncontrol those activities.  However, it does not include the work's\nSystem Libraries, or general-purpose tools or generally available free\nprograms which are used unmodified in performing those activities but\nwhich are not part of the work.  For example, Corresponding Source\nincludes interface definition files associated with source files for\nthe work, and the source code for shared libraries and dynamically\nlinked subprograms that the work is specifically designed to require,\nsuch as by intimate data communication or control flow between those\nsubprograms and other parts of the work.\n\n  The Corresponding Source need not include anything that users\ncan regenerate automatically from other parts of the Corresponding\nSource.\n\n  The Corresponding Source for a work in source code form is that\nsame work.\n\n  2. Basic Permissions.\n\n  All rights granted under this License are granted for the term of\ncopyright on the Program, and are irrevocable provided the stated\nconditions are met.  This License explicitly affirms your unlimited\npermission to run the unmodified Program.  The output from running a\ncovered work is covered by this License only if the output, given its\ncontent, constitutes a covered work.  This License acknowledges your\nrights of fair use or other equivalent, as provided by copyright law.\n\n  You may make, run and propagate covered works that you do not\nconvey, without conditions so long as your license otherwise remains\nin force.  You may convey covered works to others for the sole purpose\nof having them make modifications exclusively for you, or provide you\nwith facilities for running those works, provided that you comply with\nthe terms of this License in conveying all material for which you do\nnot control copyright.  Those thus making or running the covered works\nfor you must do so exclusively on your behalf, under your direction\nand control, on terms that prohibit them from making any copies of\nyour copyrighted material outside their relationship with you.\n\n  Conveying under any other circumstances is permitted solely under\nthe conditions stated below.  Sublicensing is not allowed; section 10\nmakes it unnecessary.\n\n  3. Protecting Users' Legal Rights From Anti-Circumvention Law.\n\n  No covered work shall be deemed part of an effective technological\nmeasure under any applicable law fulfilling obligations under article\n11 of the WIPO copyright treaty adopted on 20 December 1996, or\nsimilar laws prohibiting or restricting circumvention of such\nmeasures.\n\n  When you convey a covered work, you waive any legal power to forbid\ncircumvention of technological measures to the extent such circumvention\nis effected by exercising rights under this License with respect to\nthe covered work, and you disclaim any intention to limit operation or\nmodification of the work as a means of enforcing, against the work's\nusers, your or third parties' legal rights to forbid circumvention of\ntechnological measures.\n\n  4. Conveying Verbatim Copies.\n\n  You may convey verbatim copies of the Program's source code as you\nreceive it, in any medium, provided that you conspicuously and\nappropriately publish on each copy an appropriate copyright notice;\nkeep intact all notices stating that this License and any\nnon-permissive terms added in accord with section 7 apply to the code;\nkeep intact all notices of the absence of any warranty; and give all\nrecipients a copy of this License along with the Program.\n\n  You may charge any price or no price for each copy that you convey,\nand you may offer support or warranty protection for a fee.\n\n  5. Conveying Modified Source Versions.\n\n  You may convey a work based on the Program, or the modifications to\nproduce it from the Program, in the form of source code under the\nterms of section 4, provided that you also meet all of these conditions:\n\n    a) The work must carry prominent notices stating that you modified\n    it, and giving a relevant date.\n\n    b) The work must carry prominent notices stating that it is\n    released under this License and any conditions added under section\n    7.  This requirement modifies the requirement in section 4 to\n    \"keep intact all notices\".\n\n    c) You must license the entire work, as a whole, under this\n    License to anyone who comes into possession of a copy.  This\n    License will therefore apply, along with any applicable section 7\n    additional terms, to the whole of the work, and all its parts,\n    regardless of how they are packaged.  This License gives no\n    permission to license the work in any other way, but it does not\n    invalidate such permission if you have separately received it.\n\n    d) If the work has interactive user interfaces, each must display\n    Appropriate Legal Notices; however, if the Program has interactive\n    interfaces that do not display Appropriate Legal Notices, your\n    work need not make them do so.\n\n  A compilation of a covered work with other separate and independent\nworks, which are not by their nature extensions of the covered work,\nand which are not combined with it such as to form a larger program,\nin or on a volume of a storage or distribution medium, is called an\n\"aggregate\" if the compilation and its resulting copyright are not\nused to limit the access or legal rights of the compilation's users\nbeyond what the individual works permit.  Inclusion of a covered work\nin an aggregate does not cause this License to apply to the other\nparts of the aggregate.\n\n  6. Conveying Non-Source Forms.\n\n  You may convey a covered work in object code form under the terms\nof sections 4 and 5, provided that you also convey the\nmachine-readable Corresponding Source under the terms of this License,\nin one of these ways:\n\n    a) Convey the object code in, or embodied in, a physical product\n    (including a physical distribution medium), accompanied by the\n    Corresponding Source fixed on a durable physical medium\n    customarily used for software interchange.\n\n    b) Convey the object code in, or embodied in, a physical product\n    (including a physical distribution medium), accompanied by a\n    written offer, valid for at least three years and valid for as\n    long as you offer spare parts or customer support for that product\n    model, to give anyone who possesses the object code either (1) a\n    copy of the Corresponding Source for all the software in the\n    product that is covered by this License, on a durable physical\n    medium customarily used for software interchange, for a price no\n    more than your reasonable cost of physically performing this\n    conveying of source, or (2) access to copy the\n    Corresponding Source from a network server at no charge.\n\n    c) Convey individual copies of the object code with a copy of the\n    written offer to provide the Corresponding Source.  This\n    alternative is allowed only occasionally and noncommercially, and\n    only if you received the object code with such an offer, in accord\n    with subsection 6b.\n\n    d) Convey the object code by offering access from a designated\n    place (gratis or for a charge), and offer equivalent access to the\n    Corresponding Source in the same way through the same place at no\n    further charge.  You need not require recipients to copy the\n    Corresponding Source along with the object code.  If the place to\n    copy the object code is a network server, the Corresponding Source\n    may be on a different server (operated by you or a third party)\n    that supports equivalent copying facilities, provided you maintain\n    clear directions next to the object code saying where to find the\n    Corresponding Source.  Regardless of what server hosts the\n    Corresponding Source, you remain obligated to ensure that it is\n    available for as long as needed to satisfy these requirements.\n\n    e) Convey the object code using peer-to-peer transmission, provided\n    you inform other peers where the object code and Corresponding\n    Source of the work are being offered to the general public at no\n    charge under subsection 6d.\n\n  A separable portion of the object code, whose source code is excluded\nfrom the Corresponding Source as a System Library, need not be\nincluded in conveying the object code work.\n\n  A \"User Product\" is either (1) a \"consumer product\", which means any\ntangible personal property which is normally used for personal, family,\nor household purposes, or (2) anything designed or sold for incorporation\ninto a dwelling.  In determining whether a product is a consumer product,\ndoubtful cases shall be resolved in favor of coverage.  For a particular\nproduct received by a particular user, \"normally used\" refers to a\ntypical or common use of that class of product, regardless of the status\nof the particular user or of the way in which the particular user\nactually uses, or expects or is expected to use, the product.  A product\nis a consumer product regardless of whether the product has substantial\ncommercial, industrial or non-consumer uses, unless such uses represent\nthe only significant mode of use of the product.\n\n  \"Installation Information\" for a User Product means any methods,\nprocedures, authorization keys, or other information required to install\nand execute modified versions of a covered work in that User Product from\na modified version of its Corresponding Source.  The information must\nsuffice to ensure that the continued functioning of the modified object\ncode is in no case prevented or interfered with solely because\nmodification has been made.\n\n  If you convey an object code work under this section in, or with, or\nspecifically for use in, a User Product, and the conveying occurs as\npart of a transaction in which the right of possession and use of the\nUser Product is transferred to the recipient in perpetuity or for a\nfixed term (regardless of how the transaction is characterized), the\nCorresponding Source conveyed under this section must be accompanied\nby the Installation Information.  But this requirement does not apply\nif neither you nor any third party retains the ability to install\nmodified object code on the User Product (for example, the work has\nbeen installed in ROM).\n\n  The requirement to provide Installation Information does not include a\nrequirement to continue to provide support service, warranty, or updates\nfor a work that has been modified or installed by the recipient, or for\nthe User Product in which it has been modified or installed.  Access to a\nnetwork may be denied when the modification itself materially and\nadversely affects the operation of the network or violates the rules and\nprotocols for communication across the network.\n\n  Corresponding Source conveyed, and Installation Information provided,\nin accord with this section must be in a format that is publicly\ndocumented (and with an implementation available to the public in\nsource code form), and must require no special password or key for\nunpacking, reading or copying.\n\n  7. Additional Terms.\n\n  \"Additional permissions\" are terms that supplement the terms of this\nLicense by making exceptions from one or more of its conditions.\nAdditional permissions that are applicable to the entire Program shall\nbe treated as though they were included in this License, to the extent\nthat they are valid under applicable law.  If additional permissions\napply only to part of the Program, that part may be used separately\nunder those permissions, but the entire Program remains governed by\nthis License without regard to the additional permissions.\n\n  When you convey a copy of a covered work, you may at your option\nremove any additional permissions from that copy, or from any part of\nit.  (Additional permissions may be written to require their own\nremoval in certain cases when you modify the work.)  You may place\nadditional permissions on material, added by you to a covered work,\nfor which you have or can give appropriate copyright permission.\n\n  Notwithstanding any other provision of this License, for material you\nadd to a covered work, you may (if authorized by the copyright holders of\nthat material) supplement the terms of this License with terms:\n\n    a) Disclaiming warranty or limiting liability differently from the\n    terms of sections 15 and 16 of this License; or\n\n    b) Requiring preservation of specified reasonable legal notices or\n    author attributions in that material or in the Appropriate Legal\n    Notices displayed by works containing it; or\n\n    c) Prohibiting misrepresentation of the origin of that material, or\n    requiring that modified versions of such material be marked in\n    reasonable ways as different from the original version; or\n\n    d) Limiting the use for publicity purposes of names of licensors or\n    authors of the material; or\n\n    e) Declining to grant rights under trademark law for use of some\n    trade names, trademarks, or service marks; or\n\n    f) Requiring indemnification of licensors and authors of that\n    material by anyone who conveys the material (or modified versions of\n    it) with contractual assumptions of liability to the recipient, for\n    any liability that these contractual assumptions directly impose on\n    those licensors and authors.\n\n  All other non-permissive additional terms are considered \"further\nrestrictions\" within the meaning of section 10.  If the Program as you\nreceived it, or any part of it, contains a notice stating that it is\ngoverned by this License along with a term that is a further\nrestriction, you may remove that term.  If a license document contains\na further restriction but permits relicensing or conveying under this\nLicense, you may add to a covered work material governed by the terms\nof that license document, provided that the further restriction does\nnot survive such relicensing or conveying.\n\n  If you add terms to a covered work in accord with this section, you\nmust place, in the relevant source files, a statement of the\nadditional terms that apply to those files, or a notice indicating\nwhere to find the applicable terms.\n\n  Additional terms, permissive or non-permissive, may be stated in the\nform of a separately written license, or stated as exceptions;\nthe above requirements apply either way.\n\n  8. Termination.\n\n  You may not propagate or modify a covered work except as expressly\nprovided under this License.  Any attempt otherwise to propagate or\nmodify it is void, and will automatically terminate your rights under\nthis License (including any patent licenses granted under the third\nparagraph of section 11).\n\n  However, if you cease all violation of this License, then your\nlicense from a particular copyright holder is reinstated (a)\nprovisionally, unless and until the copyright holder explicitly and\nfinally terminates your license, and (b) permanently, if the copyright\nholder fails to notify you of the violation by some reasonable means\nprior to 60 days after the cessation.\n\n  Moreover, your license from a particular copyright holder is\nreinstated permanently if the copyright holder notifies you of the\nviolation by some reasonable means, this is the first time you have\nreceived notice of violation of this License (for any work) from that\ncopyright holder, and you cure the violation prior to 30 days after\nyour receipt of the notice.\n\n  Termination of your rights under this section does not terminate the\nlicenses of parties who have received copies or rights from you under\nthis License.  If your rights have been terminated and not permanently\nreinstated, you do not qualify to receive new licenses for the same\nmaterial under section 10.\n\n  9. Acceptance Not Required for Having Copies.\n\n  You are not required to accept this License in order to receive or\nrun a copy of the Program.  Ancillary propagation of a covered work\noccurring solely as a consequence of using peer-to-peer transmission\nto receive a copy likewise does not require acceptance.  However,\nnothing other than this License grants you permission to propagate or\nmodify any covered work.  These actions infringe copyright if you do\nnot accept this License.  Therefore, by modifying or propagating a\ncovered work, you indicate your acceptance of this License to do so.\n\n  10. Automatic Licensing of Downstream Recipients.\n\n  Each time you convey a covered work, the recipient automatically\nreceives a license from the original licensors, to run, modify and\npropagate that work, subject to this License.  You are not responsible\nfor enforcing compliance by third parties with this License.\n\n  An \"entity transaction\" is a transaction transferring control of an\norganization, or substantially all assets of one, or subdividing an\norganization, or merging organizations.  If propagation of a covered\nwork results from an entity transaction, each party to that\ntransaction who receives a copy of the work also receives whatever\nlicenses to the work the party's predecessor in interest had or could\ngive under the previous paragraph, plus a right to possession of the\nCorresponding Source of the work from the predecessor in interest, if\nthe predecessor has it or can get it with reasonable efforts.\n\n  You may not impose any further restrictions on the exercise of the\nrights granted or affirmed under this License.  For example, you may\nnot impose a license fee, royalty, or other charge for exercise of\nrights granted under this License, and you may not initiate litigation\n(including a cross-claim or counterclaim in a lawsuit) alleging that\nany patent claim is infringed by making, using, selling, offering for\nsale, or importing the Program or any portion of it.\n\n  11. Patents.\n\n  A \"contributor\" is a copyright holder who authorizes use under this\nLicense of the Program or a work on which the Program is based.  The\nwork thus licensed is called the contributor's \"contributor version\".\n\n  A contributor's \"essential patent claims\" are all patent claims\nowned or controlled by the contributor, whether already acquired or\nhereafter acquired, that would be infringed by some manner, permitted\nby this License, of making, using, or selling its contributor version,\nbut do not include claims that would be infringed only as a\nconsequence of further modification of the contributor version.  For\npurposes of this definition, \"control\" includes the right to grant\npatent sublicenses in a manner consistent with the requirements of\nthis License.\n\n  Each contributor grants you a non-exclusive, worldwide, royalty-free\npatent license under the contributor's essential patent claims, to\nmake, use, sell, offer for sale, import and otherwise run, modify and\npropagate the contents of its contributor version.\n\n  In the following three paragraphs, a \"patent license\" is any express\nagreement or commitment, however denominated, not to enforce a patent\n(such as an express permission to practice a patent or covenant not to\nsue for patent infringement).  To \"grant\" such a patent license to a\nparty means to make such an agreement or commitment not to enforce a\npatent against the party.\n\n  If you convey a covered work, knowingly relying on a patent license,\nand the Corresponding Source of the work is not available for anyone\nto copy, free of charge and under the terms of this License, through a\npublicly available network server or other readily accessible means,\nthen you must either (1) cause the Corresponding Source to be so\navailable, or (2) arrange to deprive yourself of the benefit of the\npatent license for this particular work, or (3) arrange, in a manner\nconsistent with the requirements of this License, to extend the patent\nlicense to downstream recipients.  \"Knowingly relying\" means you have\nactual knowledge that, but for the patent license, your conveying the\ncovered work in a country, or your recipient's use of the covered work\nin a country, would infringe one or more identifiable patents in that\ncountry that you have reason to believe are valid.\n\n  If, pursuant to or in connection with a single transaction or\narrangement, you convey, or propagate by procuring conveyance of, a\ncovered work, and grant a patent license to some of the parties\nreceiving the covered work authorizing them to use, propagate, modify\nor convey a specific copy of the covered work, then the patent license\nyou grant is automatically extended to all recipients of the covered\nwork and works based on it.\n\n  A patent license is \"discriminatory\" if it does not include within\nthe scope of its coverage, prohibits the exercise of, or is\nconditioned on the non-exercise of one or more of the rights that are\nspecifically granted under this License.  You may not convey a covered\nwork if you are a party to an arrangement with a third party that is\nin the business of distributing software, under which you make payment\nto the third party based on the extent of your activity of conveying\nthe work, and under which the third party grants, to any of the\nparties who would receive the covered work from you, a discriminatory\npatent license (a) in connection with copies of the covered work\nconveyed by you (or copies made from those copies), or (b) primarily\nfor and in connection with specific products or compilations that\ncontain the covered work, unless you entered into that arrangement,\nor that patent license was granted, prior to 28 March 2007.\n\n  Nothing in this License shall be construed as excluding or limiting\nany implied license or other defenses to infringement that may\notherwise be available to you under applicable patent law.\n\n  12. No Surrender of Others' Freedom.\n\n  If conditions are imposed on you (whether by court order, agreement or\notherwise) that contradict the conditions of this License, they do not\nexcuse you from the conditions of this License.  If you cannot convey a\ncovered work so as to satisfy simultaneously your obligations under this\nLicense and any other pertinent obligations, then as a consequence you may\nnot convey it at all.  For example, if you agree to terms that obligate you\nto collect a royalty for further conveying from those to whom you convey\nthe Program, the only way you could satisfy both those terms and this\nLicense would be to refrain entirely from conveying the Program.\n\n  13. Use with the GNU Affero General Public License.\n\n  Notwithstanding any other provision of this License, you have\npermission to link or combine any covered work with a work licensed\nunder version 3 of the GNU Affero General Public License into a single\ncombined work, and to convey the resulting work.  The terms of this\nLicense will continue to apply to the part which is the covered work,\nbut the special requirements of the GNU Affero General Public License,\nsection 13, concerning interaction through a network will apply to the\ncombination as such.\n\n  14. Revised Versions of this License.\n\n  The Free Software Foundation may publish revised and/or new versions of\nthe GNU General Public License from time to time.  Such new versions will\nbe similar in spirit to the present version, but may differ in detail to\naddress new problems or concerns.\n\n  Each version is given a distinguishing version number.  If the\nProgram specifies that a certain numbered version of the GNU General\nPublic License \"or any later version\" applies to it, you have the\noption of following the terms and conditions either of that numbered\nversion or of any later version published by the Free Software\nFoundation.  If the Program does not specify a version number of the\nGNU General Public License, you may choose any version ever published\nby the Free Software Foundation.\n\n  If the Program specifies that a proxy can decide which future\nversions of the GNU General Public License can be used, that proxy's\npublic statement of acceptance of a version permanently authorizes you\nto choose that version for the Program.\n\n  Later license versions may give you additional or different\npermissions.  However, no additional obligations are imposed on any\nauthor or copyright holder as a result of your choosing to follow a\nlater version.\n\n  15. Disclaimer of Warranty.\n\n  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY\nAPPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT\nHOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM \"AS IS\" WITHOUT WARRANTY\nOF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,\nTHE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\nPURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM\nIS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF\nALL NECESSARY SERVICING, REPAIR OR CORRECTION.\n\n  16. Limitation of Liability.\n\n  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\nWILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS\nTHE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY\nGENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE\nUSE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF\nDATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD\nPARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),\nEVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF\nSUCH DAMAGES.\n\n  17. Interpretation of Sections 15 and 16.\n\n  If the disclaimer of warranty and limitation of liability provided\nabove cannot be given local legal effect according to their terms,\nreviewing courts shall apply local law that most closely approximates\nan absolute waiver of all civil liability in connection with the\nProgram, unless a warranty or assumption of liability accompanies a\ncopy of the Program in return for a fee.\n\n                     END OF TERMS AND CONDITIONS\n\n            How to Apply These Terms to Your New Programs\n\n  If you develop a new program, and you want it to be of the greatest\npossible use to the public, the best way to achieve this is to make it\nfree software which everyone can redistribute and change under these terms.\n\n  To do so, attach the following notices to the program.  It is safest\nto attach them to the start of each source file to most effectively\nstate the exclusion of warranty; and each file should have at least\nthe \"copyright\" line and a pointer to where the full notice is found.\n\n    <one line to give the program's name and a brief idea of what it does.>\n    Copyright (C) <year>  <name of author>\n\n    This program is free software: you can redistribute it and/or modify\n    it under the terms of the GNU General Public License as published by\n    the Free Software Foundation, either version 3 of the License, or\n    (at your option) any later version.\n\n    This program is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n    GNU General Public License for more details.\n\n    You should have received a copy of the GNU General Public License\n    along with this program.  If not, see <https://www.gnu.org/licenses/>.\n\nAlso add information on how to contact you by electronic and paper mail.\n\n  If the program does terminal interaction, make it output a short\nnotice like this when it starts in an interactive mode:\n\n    <program>  Copyright (C) <year>  <name of author>\n    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.\n    This is free software, and you are welcome to redistribute it\n    under certain conditions; type `show c' for details.\n\nThe hypothetical commands `show w' and `show c' should show the appropriate\nparts of the General Public License.  Of course, your program's commands\nmight be different; for a GUI interface, you would use an \"about box\".\n\n  You should also get your employer (if you work as a programmer) or school,\nif any, to sign a \"copyright disclaimer\" for the program, if necessary.\nFor more information on this, and how to apply and follow the GNU GPL, see\n<https://www.gnu.org/licenses/>.\n\n  The GNU General Public License does not permit incorporating your program\ninto proprietary programs.  If your program is a subroutine library, you\nmay consider it more useful to permit linking proprietary applications with\nthe library.  If this is what you want to do, use the GNU Lesser General\nPublic License instead of this License.  But first, please read\n<https://www.gnu.org/licenses/why-not-lgpl.html>.\n"
  },
  {
    "path": "README.md",
    "content": "<h1 align=\"center\">Next-Fast-Turbo</h1>\n\n<p align=\"center\">\n  <a href=\"#introduction\"><strong>Introduction</strong></a> |   \n  <a href=\"#features\"><strong>Features</strong></a> |   \n  <a href=\"#tech-stack\"><strong>Tech Stack</strong></a> |   \n  <a href=\"#getting-started\"><strong>Getting started</strong></a> |   \n  <a href=\"#contributing\"><strong>Contributing</strong></a>\n</p>\n<p align=\"center\">\n  <a href=\"https://next-fast-turbo.mintlify.app/\">\n    <img src=\"https://img.shields.io/badge/Read%20the%20Documentation-8A2BE2\" alt=\"Documentation\" />\n  </a>\n</p>\n<br/>\n\n## Introduction\n\nNext-Fast-Turbo is an open-source project scaffold. It's designed to be easy to get up and running both locally and in production. It's a monorepo that includes a Next.js frontend, a FastAPI backend, and a fully built and annotated Mintlify documentation site. It's built with TypeScript, and includes ESLint and Prettier for code quality. It's also set up to use Vercel for deployments and Remote Caching.\n\nView the live frontend at [next-fast-turbo-web.vercel.app](https://next-fast-turbo-web.vercel.app/) and the live backend at [next-fast-turbo-api.vercel.app](https://next-fast-turbo-api.vercel.app/).\n\n## Features\n\n- Pre-configured [FastAPI backend](https://next-fast-turbo.mintlify.app/documentation/configuration/fastapi)\n- Pre-configured [Next.js frontend](https://next-fast-turbo.mintlify.app/documentation/configuration/nextjs)\n- Pre-configured [Mintlify documentation site](https://next-fast-turbo.mintlify.app/documentation/configuration/docs)\n\n## Tech Stack\n\n- [Next.js](https://nextjs.org/) – Frontend Framework\n- [Tailwind](https://tailwindcss.com/) – CSS Framework\n- [ShadCN UI](https://ui.shadcn.com/) – UI Components\n- [FastAPI](https://fastapi.tiangolo.com/) – Python Backend\n- [Mintlify](https://mintlify.com/) – Documentation\n- [Supabase](https://supabase.com/) – Database\n- [Turborepo](https://turbo.build/repo) – Monorepo\n- [Vercel](https://vercel.com/) – deployments\n\n## Getting started\n\nNext-Fast-Turbo is designed to be cloned and modified to each project. For more information on getting started, [view the documentation](https://next-fast-turbo.mintlify.app/documentation/introduction).\n\n## Contributing\n\nContributions are welcome. Here's how you can contribute:\n\n- [Open an issue](https://github.com/cording12/next-fast-turbo/issues) if you believe you've encountered a bug.\n- Follow the [local development guide](https://next-fast-turbo.mintlify.app/documentation/local-development) to get your local dev environment set up.\n- Make a [pull request](https://github.com/cording12/next-fast-turbo/pulls) to add new features/make quality-of-life improvements/fix bugs.\n\n## License\n\nNext-Fast-Turbo is open-source under the GNU General Public License Version 3 (GPLv3) or any later version.\n"
  },
  {
    "path": "apps/api/.vscode/launch.json",
    "content": "{\n  \"version\": \"0.2.0\",\n  \"configurations\": [\n    {\n      \"name\": \"Python: FastAPI\",\n      \"type\": \"debugpy\",\n      \"request\": \"launch\",\n      \"module\": \"uvicorn\",\n      \"args\": [\"src.main:app\", \"--reload\"],\n      \"jinja\": true\n    }\n  ]\n}\n"
  },
  {
    "path": "apps/api/.vscode/settings.json",
    "content": "{\n  \"python.testing.pytestArgs\": [\"tests\"],\n  \"python.testing.unittestEnabled\": false,\n  \"python.testing.pytestEnabled\": true\n}\n"
  },
  {
    "path": "apps/api/README.md",
    "content": "Generate requirements.txt using Poetry package manager:\n\n```\npoetry export --without-hashes --format=requirements.txt > requirements.txt\n```\n\nPython monorepo info:\nhttps://medium.com/@ashley.e.shultz/python-mono-repo-with-only-built-in-tooling-7c2d52c2fc66\n"
  },
  {
    "path": "apps/api/harry-potter-db-seed-spells.csv",
    "content": "﻿id,name,description\nc76a2922-ba4c-4278-baab-44defb631236,Aberto,Opens locked doors\n06485500-d023-4799-93fd-77f2c3341aa3,Accio,Summons objects\nacbc0ae1-12e1-4813-b51e-09d22de40475,Aguamenti,Summons water\nc9d2f389-a419-4f7e-8d3d-254959638019,Alohomora,Unlocks objects\n018429a5-15d5-41af-bf8f-98a966733d77,Anapneo,Clears someone's airway\nc828685c-52d2-466d-bcc6-fbcd8376cfb5,Aparecium,Reveals secret written messages\n7fdd393c-2608-4ef3-9fd0-f691ad6f8b88,Apparate,A non-verbal transportation spell that allows a witch or wizard to instantly travel on the spot and appear at another location (disapparate is the opposite)\n73886d47-2808-4861-ae40-956f4cb56272,Ascendio,Propells someone into the air\n9a6b6854-8858-4b21-b761-12526a154597,Avada Kedavra,\"Also known as The Killing Curse, the most evil spell in the Wizarding World; one of three Unforgivable Curses; Harry Potter is the only known witch or wizard to survive it\"\nb6f20bba-c0db-4ad2-8ac6-2a375a596287,Avis,Conjures a small flock of birds\n48edfe4d-ddfc-49ac-8065-bd7e73c73778,Bat,Bogey Hex - Turns the target's boogers into bats\n6bd8d5c1-9375-4b70-8d6e-ad019176c7a2,Bombardo,Creates an explosion\n8fc19d10-3130-4b85-95c1-f2a51ba5ee3c,Brackium Emendo,Heals broken bones\nf08c17fa-7bf9-49bf-9fba-a7806815bc80,Capacious Extremis,\"Known as the Extension Charm, it's a complicated spell that can greatly expand or extend the capacity of an object or space without affecting it externally\"\n55dec867-ac07-4975-94c7-090f6fd25c86,Confundo,\"Known as the Confundus Charm, it causes confusion of the target\"\n816d9fee-b78f-47b4-be46-b48626c013f9,Conjunctivitis Curse,Affects the eyes and sight of a target\n58b8727a-6c0c-469c-b91d-8ac0cc0dd2d8,Crinus Muto,Changes hair color and style\nf1e91049-e866-4f6f-9d87-d6fd366aecbf,Crucio,\"One of three Unforgivable Curses, it causes unbearable pain in the target\"\n7324e645-8f41-4c83-a367-0d10a72906ff,Diffindo,Used to precisely cut an object\n638072b9-b7ac-405d-914b-d9293c5f9d25,Disillusionment Charm,Causes the target to take on the appearance of its surroundings\nb7643e32-ef9c-41b8-83f2-03f6b5015e04,Disapparate,A non-verbal transportation spell that allows a witch or wizard to instantly travel on the spot and leave for another location (apparate is the opposite)\n20476c31-4f27-49ac-876f-a4c4028f1b5b,Engorgio,Causes rapid growth in the targeted object\necb9a882-d6d7-495e-9958-a1a06902bb65,Episkey,Heals minor injuries\n317ff981-ad65-421e-92fb-5f6647d95232,Expecto patronum,\"The Patronus Charm is a powerful projection of hope and happiness that drives away Dementors; a corpeal Patronus takes the the respective animal form of the caster, while a non-corpeal appears as a wisp of light; at 13, Harry Potter was the youngest known witch or wizard to prouduce a corpeal Patronus\"\n60149246-91cf-44a5-8885-78a7acc4bf90,Erecto,\"Allows a witch or wizard to build a structure, like a tent\"\n6d8138c3-0773-4c23-b0bf-aab0e5c6fd95,Evanesco,Vanishes objects\n678474e6-fb30-4bf0-a18c-228f6b36592d,Expelliarmus,Forces an opponent to drop whatever's in their possession\n31b38b6c-4775-4e20-815d-dbf302433de6,Ferula,A healing charm that conjures wraps and bandages for wounds\n37d262c9-28ab-408f-9576-acf54ce50203,Fidelius Charm,\"A complex charm that conceals a secret into the soul of a chosen \"\"Secret Keeper\"\". If a location is the subject of concealment, it becomes undetectable to others\"\n9121b557-0ebf-4b60-a119-9d1c5ff05dee,Fiendfyre Curse,\"Conjures destructive, enormous enchanted flames\"\nde23025f-5e6a-4ec3-b827-5c526a922a89,Finite Incantatem,A general counter-spell that's used to reverse or counter already cast charms\nd536cbe5-bc0f-49e5-b063-e02c231a3988,Furnunculus Curse,A jinx that causes a breakout of boils or pimples\n7915b07a-d26e-4057-9083-e457643e57a6,Geminio,Duplicates objects\n2a942514-7a19-4f0e-9353-171c573abcba,Glisseo,Transforms a staircase into a slide\na42028b6-67f5-463b-b759-452103533227,Homenum Revelio,Reveals the presence of another person\n552cd4ee-2c67-48fd-ae20-a83773262a8a,Homonculus Charm,Detects anyone's true identity and location on a piece of parchment; used to create the Marauder's Map\n2dfca7d2-ec9b-4150-b3f3-fd972a5fd1bc,Immobulus,Immobilises living targets\na49300cc-ddbf-4ff4-b8c2-e8bddbbe4118,Impedimenta,A temporary jinx that slows the movement of the target\ne5c22d31-26f1-4c88-a586-d9c09cb88c1f,Incarcerous,Conjures ropes\na53ad5be-00ee-4254-b3c0-4cec60b0c034,Imperio,\"One of the three Unforgivable Curses, it places the target under the complete control of the caster\"\na3b34bf6-1ff7-4fe3-81ee-e617150f5da9,Impervius,Makes an object waterproof\nde048df0-b227-4376-a29b-90fe6878d950,Incendio,Conjures flames\nc4a4520b-b80d-49e8-9e5a-3ca0a7f376ca,Langlock,Causes the target's tongue to stick to the roof of their mouth\n0da7cb76-dabc-46ff-b8e9-c23a4f03caea,Legilimens,Invading or navigating another's mind\n723dd9c9-ee62-495b-9071-cddd16087b86,Levicorpus,Levitates the target by their ankle\n8add16ef-b4b1-4e2b-a91e-80aa194da438,Locomotor Mortis,The Leg-Locker curse bounds the target's legs\n3b7a10ce-3339-4a36-9493-292c8775e47b,Lumos,Illuminates the caster's wand\n832edaca-dbff-4a57-80c7-1d8a827c8416,Morsmordre,Conjures and projects Lord Voldemort's Dark Mark\n7f4b43e0-3356-43f9-9299-15ec37cfaf76,Mucus Ad Nauseam,Inflicts an extreme runny nose or cold\nf86bbf7e-94ea-4c22-89fb-809af8214a85,Muffliato,Creates a buzzing sound in the target's ears to prevent eavesdropping\n66be613d-532c-46d8-a3e9-f5a2d9cccf0c,Nox,\"Reverses the lumos charm, extinguishing a wand's light\"\n9e3c0217-652a-4763-82f8-5519026a1ea6,Obliviate,Erases the target's memory\n0af49753-c8ae-4748-87a7-b7cfc47d33a0,Obscuro,Conjures a blindfold\n67e838c1-4623-414e-9a91-12125631dbad,Oculus Reparo,Repairs eyeglasses\n12251f32-af9d-408f-a652-3a4cc9602bc0,Oppugno,Directs an object or person to attack a victim\nda9eab7b-2c7c-42de-861c-fb254bd9423c,Petrificus Totalus,Temporarily freezes or petrifies the body of the target\n3e5fd245-2ecf-40c4-937d-b2c2f9eee003,Periculum,Conjures flares/red sparks\nad5685f8-6e05-49b1-a41c-d72786001d72,Piertotum Locomotor,Incantation used to bring to life inanimate objects and artifacts\n0a267162-0594-4372-a3d5-89382926f495,Protean Charm,Links objects together for better communication\n8808aa30-39f4-400c-a0e5-1dcbad657931,Protego,\"Casts an invisible shield around the caster, protecting against spells and objects (except for The Killing Curse)\"\n56742dd7-3c93-4085-bea3-971e88d81dc2,Reducto,Reduces the target to pieces\n2f177949-1f80-4663-9840-da8197411f2a,Reducio,Shrinks an enlarged object to its regular size\n358ecb3c-e684-492c-b706-47cbd1eae02e,Renneverate,Awakens or revives the target\n1b7a8a4c-8d4f-4001-8155-e68f1198ef72,Reparifors,Heals magical ailments like poisoning or paralysis\n799f31a3-799e-411f-b67c-a64e48a5f503,Reparo,Fixes broken objects\n32dbeb89-0978-4037-ab1b-413d62be02c3,Rictusempra,A charm that disarms an opponent by tickling them\nc9dc8bed-5834-4001-8fa1-852690d027f2,Riddikulus,\"Used to defeat a Boggart, the charm allows the scary creature to assume a comedic form, disarming it\"\n14c47e18-cbf3-4aec-afd3-5473d18ee7c0,Scourgify,Cleans objects\n3617c34c-e650-4e3b-a13a-651d18471225,Sectumsempra,Inflicts severe lacerations and haemorrhaging on the target\n53747fb8-bdab-466e-90fb-ca75c66f3dd9,Serpensortia,Conjures a live snake\n43d3d53e-7ab9-4145-bda7-d96be99c5d31,Silencio,Silences the target\nd5f71164-fa43-4566-b537-8852859bde01,Sonorus,Amplifies the witch or wizard's voice\n9ec3258c-bc2f-4427-8440-ebea450a44aa,Spongify,Softens the target\n37110a48-07e3-4fd7-9aae-ac1145161e1e,Stupefy,The Stunning spell freezes objects and renders living targets unconscious\ndaeb6f2a-5aff-43e1-964a-a06da7f66a3c,Tarantallegra,\"Aimed at the legs, causes uncontrollable dancing movement\"\n4eaa6532-3ef2-428d-922f-101aee3d66ed,Unbreakable Vow,A magically binding contract that results in the death of whoever breaks it\ne23728b2-f6fd-4c70-a1d2-ce602940d873,Wingardium Leviosa,\"Causes an object to levitate; but remember what Hermione said: \"\"It's Wing-gar-dium Levi-o-sa, make the 'gar' nice and long.'\"\"\"\n"
  },
  {
    "path": "apps/api/harry-potter-db-seed-users.csv",
    "content": "﻿id,forename,surname,email\nfd142190-f1d7-4ce2-bdb3-6ed6b3edc020,Patricia,Stimpson,patriciastimpson@hogwarts.com\nf94086b8-03ae-4457-ba2c-e624d0980869,Lavender,Brown,lavenderbrown@hogwarts.com\necca342d-d345-4fb3-8a85-ece848ab8938,Milicent,Bullstroude,milicentbullstroude@hogwarts.com\nec714982-e604-40d4-bd4c-dc5155506957,Morag,MacDougal,moragmacdougal@hogwarts.com\neaea5eb3-48a3-41c6-9ea5-c695299bab16,Lisa,Turpin,lisaturpin@hogwarts.com\ne7f4554e-8193-4b16-a40b-a8b38a0c3e57,Graham,Montague,grahammontague@hogwarts.com\ne65c8acb-0dfc-4f15-bcf8-d32b78811093,Rose,Zeller,rosezeller@hogwarts.com\ne4653b01-76a5-4769-a6a2-1f2efaf89cbb,Rose,Weasley,roseweasley@hogwarts.com\ne32dd37c-91cd-4950-8ef2-e2ba1b87bd75,Lily,Moon,lilymoon@hogwarts.com\ndcdc063e-cf3e-48fc-b777-65922e899b38,Albus,Severus,albusseverus@hogwarts.com\nd9cec110-a1d0-4437-9a55-dced475dfe6d,Andrew,Kirke,andrewkirke@hogwarts.com\nd5c4daa3-c726-426a-aa98-fb40f3fba816,Cedric,Diggory,cedricdiggory@hogwarts.com\ncf3707ad-e816-4b54-90d0-403800a06ecd,Emma,Dobbs,emmadobbs@hogwarts.com\ncb263aed-289b-43ad-8647-db54b8a5fc92,Michael,Corner,michaelcorner@hogwarts.com\nc8aed011-ab8f-46df-9e8d-dde938256ea9,Miles,Bletchley,milesbletchley@hogwarts.com\nc74b1fae-4793-4b47-bec2-ee652beabce2,Ritchie,Coote,ritchiecoote@hogwarts.com\nc61b5c80-2c8e-404f-88ca-349a6344f35c,Cassius,Warrington,cassiuswarrington@hogwarts.com\nc5acae3e-1a05-4f1d-bb83-3f8c7639d84e,Mandy,Brocklehurst,mandybrocklehurst@hogwarts.com\nc3b1f9a5-b87b-48bf-b00d-95b093ea6390,Ron,Weasley,ronweasley@hogwarts.com\nc29cd5f9-d2c3-4be9-ba1c-04169cdf511b,Alicia,Spinet,aliciaspinet@hogwarts.com\nbff82738-5bb0-4edc-9cec-f80d1af4801f,Vicky,Frobisher,vickyfrobisher@hogwarts.com\nb78e6677-8bb4-4eb7-97cb-2f86677e27ea,Adrian,Pucey,adrianpucey@hogwarts.com\nb634f0a1-7b48-49b6-b039-27f947ee76fd,Angelina,Johnson,angelinajohnson@hogwarts.com\nb01be346-290b-4f65-9c88-a49922e116ee,Orla,Quirke,orlaquirke@hogwarts.com\naf95bd8a-dfae-45bb-bc69-533860d34129,Draco,Malfoy,dracomalfoy@hogwarts.com\nae068570-8419-4063-bf61-ba4a0ef41fe3,Laura,Madley,lauramadley@hogwarts.com\na93b80a0-987d-4148-944d-16043df95e8c,Dennis,Creevey,denniscreevey@hogwarts.com\na506574f-c8cf-46c6-a8ac-2f805c25e49e,Graham,Pritchard,grahampritchard@hogwarts.com\na3e5ea64-b103-4f47-bc26-dc08b799c668,Eddie,Carmichael,eddiecarmichael@hogwarts.com\na31ddc78-af12-4978-929c-3cc8a00a833e,Gregory,Goyle,gregorygoyle@hogwarts.com\na01f6dbb-bad5-426b-a7df-f9613fa1021d,Euan,Abercrombie,euanabercrombie@hogwarts.com\n9e3f7ce4-b9a7-4244-b709-dae5c1f1d4a8,Harry,Potter,harrypotter@hogwarts.com\n9c8ce8c7-ae0a-4646-920f-09c071862f10,James,Potter,jamespotter@hogwarts.com\n9ba0ca6e-4fba-410d-9b5e-e20694dde413,Melinda,Bobbin,melindabobbin@hogwarts.com\n9ac09267-92ea-444a-a395-28f3b0f6fe6f,Terrence,Higgs,terrencehiggs@hogwarts.com\n98546bab-8d5b-4627-95f6-38e306d58a91,Owen,Cauldwell,owencauldwell@hogwarts.com\n979ab773-944f-4ff8-88be-943a4bc2c18a,Lee,Jordan,leejordan@hogwarts.com\n938559ee-e8e5-4963-8437-e7da04fd1b31,Marcus,Belby,marcusbelby@hogwarts.com\n9055a7b1-6ac9-4363-977c-4dec78572fad,Terry,Boot,terryboot@hogwarts.com\n8f9aa40b-5d7c-441e-ad32-4564ecda3b70,Cho,Chang,chochang@hogwarts.com\n8f3b8796-c7b9-442e-ac02-113d48306fc7,Percy,Weasley,percyweasley@hogwarts.com\n8e557e86-28d5-433f-8ac1-d2cecfeb8fb7,Colin,Creevey,colincreevey@hogwarts.com\n88886e27-9ce2-416f-9dd6-56d4cd94a4fb,Geoffrey,Hooper,geoffreyhooper@hogwarts.com\n861c4cde-2f0f-4796-8d8f-9492e74b2573,Luna,Lovegood,lunalovegood@hogwarts.com\n7f2f6207-8998-4f98-92c2-8d02898a82eb,Scorpius,Malfoy,scorpiusmalfoy@hogwarts.com\n7cc5e694-850d-4c44-830b-7154e23bb5c3,Susan,Bones,susanbones@hogwarts.com\n781f1061-5413-40c7-8a35-b078e2e969b1,Barnabas,the,barnabasthe@hogwarts.com\n7772cb4e-5c33-405a-970d-c05cae167917,Daphne,Greengrass,daphnegreengrass@hogwarts.com\n6fa93583-b935-4228-91e0-729e6713bdab,Zacharias,Smith,zachariassmith@hogwarts.com\n6c4350a9-2356-4bba-96bd-0458c12d99b5,Romilda,Vane,romildavane@hogwarts.com\n69c18f6a-cd97-4218-9f2f-740393e6eb1f,Padma,Patil,padmapatil@hogwarts.com\n61b6d68e-4128-408c-9f71-9ef167cb0e69,Anthony,Goldstein,anthonygoldstein@hogwarts.com\n58a287c2-8c7a-485a-b095-8c6dcfc7f31d,Lucian,Bole,lucianbole@hogwarts.com\n57fe29d4-312a-4711-bd9a-c320253d9176,Victoire,Weasley,victoireweasley@hogwarts.com\n575fbbc2-ac94-4c58-92f6-e5d75846da91,Jack,Sloper,jacksloper@hogwarts.com\n4eef1e03-cf1c-4441-9119-a6e47a61f880,Kevin,Whitby,kevinwhitby@hogwarts.com\n4c7e6819-a91a-45b2-a454-f931e4a7cce3,Hermione,Granger,hermionegranger@hogwarts.com\n4a0f4c3b-14dc-4a9e-a2f8-da23734f5d34,Marietta,Edgecombe,mariettaedgecombe@hogwarts.com\n48880498-3903-4914-bd11-ec650d803199,Natalie,McDonald,nataliemcdonald@hogwarts.com\n47aa7511-59b9-4760-9bd7-822a1103177b,Theodore,Nott,theodorenott@hogwarts.com\n458828b3-82a5-4cad-a784-e23215825765,Peregrine,Derrick,peregrinederrick@hogwarts.com\n42915280-ba56-4ab8-8b17-9511ba2ab093,Penelope,Clearwater,penelopeclearwater@hogwarts.com\n3db6dc51-b461-4fa4-a6e4-b1ff352221c5,Neville,Longbottom,nevillelongbottom@hogwarts.com\n3d629315-1dbb-4e1e-840d-ffbf45bd5894,Sally-Anne,Perks,sally-anneperks@hogwarts.com\n341e65d4-6917-48d7-80b2-1f9af607e95a,Cormac,McLaggen,cormacmclaggen@hogwarts.com\n34155375-c8c0-415e-873a-b6483f0cbf17,Justin,Finch-Fletchley,justinfinch-fletchley@hogwarts.com\n2f8db183-e935-4b91-884f-fb9effe42ab8,Malcolm,Baddock,malcolmbaddock@hogwarts.com\n2b203c7e-7b3d-4f27-8b3c-11473904da73,Hugo,Weasley,hugoweasley@hogwarts.com\n2a0615de-8aa4-41e7-9504-dd875f5f3f01,George,Weasley,georgeweasley@hogwarts.com\n29adbbf0-417a-4c97-8467-adb5341f75e5,Eleanor,Branstone,eleanorbranstone@hogwarts.com\n28e9fe6b-3ca5-41ca-8a14-b995e0fb398b,Jimmy,Peakes,jimmypeakes@hogwarts.com\n2899e63f-ed02-4152-8ace-0270a068a70d,Pansy,Parkinson,pansyparkinson@hogwarts.com\n28741184-263c-4000-b011-ca7c60466ef4,Fred,Weasley,fredweasley@hogwarts.com\n2832bea8-7aad-4160-a748-442f5770d586,Katie,Bell,katiebell@hogwarts.com\n26bd4437-73fa-4865-afdd-2fc1456f4592,Kenneth,Towler,kennethtowler@hogwarts.com\n1fab149b-52b1-4ffe-be52-4eda25d98f5d,Blaise,Zabini,blaisezabini@hogwarts.com\n1cd6dc64-01a9-4379-9cfd-1a7167ba1bb1,Ginny,Weasley,ginnyweasley@hogwarts.com\n14aca981-2b60-413e-8f8e-3534961b534b,Millicent,Bulstrode,millicentbulstrode@hogwarts.com\n1413e1b3-2903-4a47-a2d5-e8abc5ce8014,Seamus,Finnigan,seamusfinnigan@hogwarts.com\n13a54f8a-7f68-4add-a1b4-49f60c8e7bcc,Eloise,Midgen,eloisemidgen@hogwarts.com\n0e53860c-7679-49e4-891e-fb92286f0e5b,Demelza,Robins,demelzarobins@hogwarts.com\n0e42ecbe-27b2-4940-9b03-00182a92c415,Marcus,Flint,marcusflint@hogwarts.com\n0c80d701-fa23-4126-9711-efe5f3c4789a,Ernie,Macmillan,erniemacmillan@hogwarts.com\n0af82694-e24f-45ec-a8d7-5bb1199ce631,Hannah,Abbott,hannahabbott@hogwarts.com\n0a13bf8e-a763-44cc-ac76-c6c53a639809,Roger,Davies,rogerdavies@hogwarts.com\n09396e81-d317-499f-b330-25b90ba17d20,Oliver,Wood,oliverwood@hogwarts.com\n05bd5fd1-f347-45e6-8ec0-59b7f11c2aec,Stewart,Ackerley,stewartackerley@hogwarts.com\n04f9eb45-d843-4e29-a7d3-0bd49ed87f85,Vincent,Crabbe,vincentcrabbe@hogwarts.com\n0201cf73-8a86-4358-b232-2abaa23f09af,Parvati,Patil,parvatipatil@hogwarts.com\nca3827f0-375a-4891-aaa5-f5e8a5bad225,Minerva,McGonagall,minervamcgonagall@hogwarts.com\n3569d265-bd27-44d8-88e8-82fb0a848374,Severus,Snape,severussnape@hogwarts.com\n36bfefd0-e0bb-4d11-be98-d1ef6117a77a,Rubeus,Hagrid,rubeushagrid@hogwarts.com\nb8f9095b-9de6-4d7d-83e0-4391af8f22e4,Remus,Lupin,remuslupin@hogwarts.com\n2fb675cd-5505-4c8e-a54e-579e73bf4174,Horace,Slughorn,horaceslughorn@hogwarts.com\nd58e7249-19d1-40bd-a43f-1da0497fe8aa,Dolores,Umbridge,doloresumbridge@hogwarts.com\nb0620914-858d-46fc-8e6d-033c565e138b,Mrs,Norris,mrsnorris@hogwarts.com\n2b82cfb8-0440-4a57-a030-6d75a40c0d98,Argus,Filch,argusfilch@hogwarts.com\nb415c867-1cff-455e-b194-748662ac2cca,Albus,Dumbledore,albusdumbledore@hogwarts.com\ne9457467-d10a-4893-afa9-19f9602b218a,Madam,Pomfrey,madampomfrey@hogwarts.com\nba19be27-178b-4594-95b7-51ba0e3ba1dd,Quirinus,Quirrel,quirinusquirrel@hogwarts.com\ne8694719-a975-48fb-9523-f4cade1c38aa,Pomona,Sprout,pomonasprout@hogwarts.com\n6ea188f3-d95c-407c-ab00-a0bec8678a71,Cuthbert,Binns,cuthbertbinns@hogwarts.com\na61e0783-7914-4f8d-a800-c409c06315cf,Filius,Flitwick,filiusflitwick@hogwarts.com\n0a81c4f9-b80d-45a7-a4fd-9191453815a1,Madam,Hooch,madamhooch@hogwarts.com\n3d687c4d-852e-470f-bac5-5a02758b1f8f,Gilderoy,Lockhart,gilderoylockhart@hogwarts.com\ncdec9b95-c7a5-4623-ad12-6fa76d168588,Madame,Pince,madamepince@hogwarts.com\n8ea29415-012d-4781-ba5f-d0de63a05abe,Sybill,Trelawney,sybilltrelawney@hogwarts.com\n58f2cf41-392c-4e84-b441-dbbce585f78d,Septima,Vector,septimavector@hogwarts.com\n99d3ce6b-6a45-495a-a7c6-132203697d45,Aurora,Sinistra,aurorasinistra@hogwarts.com\n41ebe856-f0f4-4c77-8795-4735d3a87f3d,Alastor,Moody,alastormoody@hogwarts.com\nb48c5b8a-4066-4c24-ba26-7677f5ed2b6f,Wilhelmina,Grubbly-Plank,wilhelminagrubbly-plank@hogwarts.com\nc4e73590-3ee2-4125-87fb-692dd991819b,Galatea,Merrythought,galateamerrythought@hogwarts.com\n61d78dce-890b-4f02-844f-b41d66553802,Charity,Burbage,charityburbage@hogwarts.com\n"
  },
  {
    "path": "apps/api/package.json",
    "content": "{\n    \"name\": \"api\",\n    \"version\": \"0.0.0\",\n    \"scripts\": {\n        \"dev\": \".\\\\.venv\\\\Scripts\\\\python run.py\",\n        \"generate:requirements\": \"poetry export --without-hashes --format=requirements.txt > requirements.txt\"\n    }\n}"
  },
  {
    "path": "apps/api/poetry.toml",
    "content": "[virtualenvs]\nin-project = true\ncreate = true\n"
  },
  {
    "path": "apps/api/pyproject.toml",
    "content": "[tool.poetry]\nname = \"api\"\nversion = \"0.1.0\"\ndescription = \"\"\nauthors = [\"cording12 <joncording12@gmail.com>\"]\n\n[tool.poetry.dependencies]\npython = \"^3.9\"\nfastapi = \"^0.109.2\"\nuvicorn = \"^0.27.1\"\nemail-validator = \"^2.1.0\"\npydantic-settings = \"^2.2.1\"\npython-dotenv = \"^1.0.1\"\nsupabase-py-async = \"^2.5.5\"\n\n[tool.poetry.dev-dependencies]\nisort = \"^5.10.1\"\nblack = \"^22.6.0\"\npytest = \"^8.0.1\"\npylint-pydantic = \"^0.3.2\"\n\n[build-system]\nrequires = [\"poetry-core>=1.0.0\"]\nbuild-backend = \"poetry.core.masonry.api\"\n"
  },
  {
    "path": "apps/api/requirements.txt",
    "content": "aiohttp==3.9.3; python_version >= \"3.9\" and python_version < \"4.0\"\naiosignal==1.3.1; python_version >= \"3.9\" and python_version < \"4.0\"\nannotated-types==0.6.0; python_version >= \"3.8\"\nanyio==4.3.0; python_version >= \"3.9\" and python_version < \"4.0\"\nargcomplete==3.2.3; python_version >= \"3.9\" and python_version < \"4.0\"\nasync-timeout==4.0.3; python_version >= \"3.9\" and python_version < \"3.11\"\nattrs==23.2.0; python_version >= \"3.9\" and python_version < \"4.0\"\ncertifi==2024.2.2; python_version >= \"3.9\" and python_version < \"4.0\"\ncharset-normalizer==3.3.2; python_version >= \"3.9\" and python_version < \"4.0\" and python_full_version >= \"3.7.0\"\nclick==8.1.7; python_version >= \"3.8\"\ncolorama==0.4.6; python_version >= \"3.9\" and python_full_version < \"3.0.0\" and platform_system == \"Windows\" and python_version < \"4.0\" or platform_system == \"Windows\" and python_version >= \"3.9\" and python_full_version >= \"3.7.0\" and python_version < \"4.0\"\ncommitizen==3.18.4; python_version >= \"3.9\" and python_version < \"4.0\"\ndecli==0.6.1; python_version >= \"3.9\" and python_version < \"4.0\"\ndeprecation==2.1.0; python_version >= \"3.9\" and python_version < \"4.0\"\ndnspython==2.6.1; python_version >= \"3.8\"\nemail-validator==2.1.1; python_version >= \"3.8\"\nexceptiongroup==1.2.0; python_version < \"3.11\" and python_version >= \"3.8\"\nfastapi==0.109.2; python_version >= \"3.8\"\nfrozenlist==1.4.1; python_version >= \"3.9\" and python_version < \"4.0\"\ngotrue==2.4.1; python_version >= \"3.9\" and python_version < \"4.0\"\nh11==0.14.0; python_version >= \"3.9\" and python_version < \"4.0\"\nhttpcore==1.0.4; python_version >= \"3.9\" and python_version < \"4.0\"\nhttpx==0.25.2; python_version >= \"3.9\" and python_version < \"4.0\"\nidna==3.6; python_version >= \"3.9\" and python_version < \"4.0\"\nimportlib-metadata==7.0.2; python_version >= \"3.9\" and python_version < \"4.0\"\njinja2==3.1.3; python_version >= \"3.9\" and python_version < \"4.0\"\nmarkupsafe==2.1.5; python_version >= \"3.9\" and python_version < \"4.0\"\nmultidict==6.0.5; python_version >= \"3.9\" and python_version < \"4.0\"\npackaging==24.0; python_version >= \"3.9\" and python_version < \"4.0\"\npostgrest==0.16.1; python_version >= \"3.9\" and python_version < \"4.0\"\nprompt-toolkit==3.0.36; python_version >= \"3.9\" and python_version < \"4.0\" and python_full_version >= \"3.6.2\"\npydantic-core==2.16.3; python_version >= \"3.8\"\npydantic-settings==2.2.1; python_version >= \"3.8\"\npydantic==2.6.4; python_version >= \"3.9\" and python_version < \"4.0\"\npython-dateutil==2.9.0.post0; python_version >= \"3.9\" and python_full_version < \"3.0.0\" and python_version < \"4.0\" or python_version >= \"3.9\" and python_version < \"4.0\" and python_full_version >= \"3.3.0\"\npython-dotenv==1.0.1; python_version >= \"3.8\"\npyyaml==6.0.1; python_version >= \"3.9\" and python_version < \"4.0\"\nquestionary==2.0.1; python_version >= \"3.9\" and python_version < \"4.0\"\nrealtime==1.0.2; python_version >= \"3.9\" and python_version < \"4.0\"\nsix==1.16.0; python_version >= \"3.9\" and python_full_version < \"3.0.0\" and python_version < \"4.0\" or python_version >= \"3.9\" and python_version < \"4.0\" and python_full_version >= \"3.3.0\"\nsniffio==1.3.1; python_version >= \"3.9\" and python_version < \"4.0\"\nstarlette==0.36.3; python_version >= \"3.8\"\nstorage3==0.7.3; python_version >= \"3.9\" and python_version < \"4.0\"\nstrenum==0.4.15; python_version >= \"3.9\" and python_version < \"4.0\"\nsupabase-py-async==2.5.5; python_version >= \"3.9\" and python_version < \"4.0\"\nsupafunc==0.4.0; python_version >= \"3.9\" and python_version < \"4.0\"\ntermcolor==2.4.0; python_version >= \"3.9\" and python_version < \"4.0\"\ntomlkit==0.12.4; python_version >= \"3.9\" and python_version < \"4.0\"\ntyping-extensions==4.10.0; python_version < \"3.10\" and python_version >= \"3.9\"\nuvicorn==0.27.1; python_version >= \"3.8\"\nwcwidth==0.2.13; python_version >= \"3.9\" and python_version < \"4.0\" and python_full_version >= \"3.6.2\"\nwebsockets==11.0.3; python_version >= \"3.9\" and python_version < \"4.0\"\nyarl==1.9.4; python_version >= \"3.9\" and python_version < \"4.0\"\nzipp==3.18.1; python_version >= \"3.9\" and python_version < \"4.0\"\n"
  },
  {
    "path": "apps/api/run.py",
    "content": "import uvicorn\n\nif __name__ == \"__main__\":\n    uvicorn.run(\"src.main:app\", reload=True)\n"
  },
  {
    "path": "apps/api/src/__init__.py",
    "content": "__version__ = \"0.1.0\"\n"
  },
  {
    "path": "apps/api/src/api/__init__.py",
    "content": ""
  },
  {
    "path": "apps/api/src/api/api_v1/__init__.py",
    "content": ""
  },
  {
    "path": "apps/api/src/api/api_v1/api.py",
    "content": "from fastapi import APIRouter\nfrom src.api.api_v1.endpoints import users, spells\n\napi_router = APIRouter()\napi_router.include_router(users.router, prefix=\"/users\", tags=[\"users\"], responses={404: {\"description\": \"Not found\"}})\napi_router.include_router(spells.router, prefix=\"/spells\", tags=[\"spells\"], responses={404: {\"description\": \"Not found\"}})\n"
  },
  {
    "path": "apps/api/src/api/api_v1/endpoints/__init__.py",
    "content": ""
  },
  {
    "path": "apps/api/src/api/api_v1/endpoints/spells.py",
    "content": "from typing import Literal, Optional, Union\n\nfrom fastapi import APIRouter, HTTPException\n\nfrom src.api.deps import SessionDep\nfrom src.crud import spell\nfrom src.schemas import Spell, SpellSearchResults\n\nrouter = APIRouter()\n\n\n@router.get(\"/get/\", status_code=200, response_model=Spell)\nasync def get_spell(session: SessionDep, spell_id: str) -> Spell:\n    \"\"\"Returns a spell from a spell_id.\n\n    **Returns:**\n    - spell: spell object.\n    \"\"\"\n    return await spell.get(session, id=spell_id)\n\n\n@router.get(\"/get-all/\", status_code=200, response_model=list[Spell])\nasync def get_all_spells(session: SessionDep) -> list[Spell]:\n    \"\"\"Returns a list of all spells.\n\n    **Returns:**\n    - list[spell]: List of all spells.\n    \"\"\"\n    return await spell.get_all(session)\n\n\n@router.get(\"/search/\", status_code=200, response_model=SpellSearchResults)\nasync def search_spells(\n    session: SessionDep,\n    search_on: Literal[\"id\", \"name\", \"description\"] = \"name\",\n    keyword: Optional[Union[str, int]] = None,\n    max_results: Optional[int] = 10,\n) -> SpellSearchResults:\n    \"\"\"\n    Search for spells based on a keyword and return the top `max_results` items.\n\n    **Args:**\n    - search_on (str, optional): The field to perform the search on. Defaults to \"name\".\n    - keyword (str, optional): The keyword to search for. Defaults to None.\n    - max_results (int, optional): The maximum number of search results to return. Defaults to 10.\n\n    **Returns:**\n    - SpellSearchResults: Object containing a list of the top `max_results` items that match the keyword.\n    \"\"\"\n    if not keyword:\n        results = await spell.get_all(session)\n        return SpellSearchResults(results=results)\n\n    results = await spell.search_all(\n        session, field=search_on, search_value=keyword, max_results=max_results\n    )\n\n    if not results:\n        raise HTTPException(\n            status_code=404, detail=\"No spells found matching the search criteria\"\n        )\n\n    return SpellSearchResults(results=results)\n"
  },
  {
    "path": "apps/api/src/api/api_v1/endpoints/users.py",
    "content": "from typing import Literal, Optional, Union\n\nfrom fastapi import APIRouter, HTTPException\n\nfrom src.api.deps import SessionDep\nfrom src.crud import user\nfrom src.schemas import User, UserCreate, UserSearchResults\n\nrouter = APIRouter()\n\n\n@router.get(\"/get/\", status_code=200, response_model=User)\nasync def get_user(session: SessionDep, user_id: str) -> User:\n    \"\"\"Returns a user from a user_id.\n\n    **Returns:**\n    - User: User object.\n    \"\"\"\n    return await user.get(session, id=user_id)\n\n\n@router.get(\"/get-all/\", status_code=200, response_model=list[User])\nasync def get_all_users(session: SessionDep) -> list[User]:\n    \"\"\"Returns a list of all users.\n\n    **Returns:**\n    - list[User]: List of all users.\n    \"\"\"\n    return await user.get_all(session)\n\n\n@router.get(\"/search/\", status_code=200, response_model=UserSearchResults)\nasync def search_users(\n    session: SessionDep,\n    search_on: Literal[\"id\", \"email\", \"forename\", \"surname\"] = \"email\",\n    keyword: Optional[Union[str, int]] = None,\n    max_results: Optional[int] = 10,\n) -> UserSearchResults:\n    \"\"\"\n    Search for users based on a keyword and return the top `max_results` items.\n\n    **Args:**\n    - keyword (str, optional): The keyword to search for. Defaults to None.\n    - max_results (int, optional): The maximum number of search results to return. Defaults to 10.\n    - search_on (str, optional): The field to perform the search on. Defaults to \"email\".\n\n    **Returns:**\n    - UserSearchResults: Object containing a list of the top `max_results` items that match the keyword.\n    \"\"\"\n    if not keyword:\n        results = await user.get_all(session)\n        return UserSearchResults(results=results)\n\n    results = await user.search_all(\n        session, field=search_on, search_value=keyword, max_results=max_results\n    )\n\n    if not results:\n        raise HTTPException(\n            status_code=404, detail=\"No users found matching the search criteria\"\n        )\n\n    return UserSearchResults(results=results)\n\n\n@router.post(\"/create\", status_code=201, response_model=User)\nasync def create_user(user_in: UserCreate, session: SessionDep) -> User:\n    \"\"\"Craete a new user.\n\n    **Args:**\n    - user_in (UserCreate): JSON of the user to create. Forename, surname and email. Email must be unique.\n\n    **Returns:**\n    - User: User object\n    \"\"\"\n    return await user.create(session, obj_in=user_in)\n"
  },
  {
    "path": "apps/api/src/api/deps.py",
    "content": "from typing import Annotated\n\nfrom fastapi import Depends, HTTPException\nfrom supabase_py_async import AsyncClient, create_client\nfrom supabase_py_async.lib.client_options import ClientOptions\n\nfrom src.config import settings\n\n\nasync def get_db() -> AsyncClient:\n    client: AsyncClient | None = None\n    try:\n        client = await create_client(\n            settings.DB_URL,\n            settings.DB_API_KEY,\n            options=ClientOptions(\n                postgrest_client_timeout=10, storage_client_timeout=10\n            ),\n        )\n        # client = await client.auth.sign_in_with_password(\n        #     {\"email\": settings.DB_EMAIL, \"password\": settings.DB_PASSWORD}\n        # )\n        yield client\n\n    except Exception as e:\n        print(e)\n        raise\n\n\nSessionDep = Annotated[AsyncClient, Depends(get_db)]\n"
  },
  {
    "path": "apps/api/src/config.py",
    "content": "import os\n\nfrom dotenv import load_dotenv\nfrom pydantic_settings import BaseSettings, SettingsConfigDict\n\nload_dotenv()\n\n# If the environment is Gitpod, the root path will be the workspace cluster host\n# If not using gitpod, you can delete this if statement, but keep the else clause\nif os.getenv(\"USER\") == \"gitpod\":\n    ROOT_PATH = f\"https://8000-cording12-nextfastturbo-qqfo0frc496.{os.getenv('GITPOD_WORKSPACE_CLUSTER_HOST')}\"\nelse:\n    # Otherwise, the root path will be the local host. ROOT_PATH is an env var configured in Vercel deployment.\n    # The value for production is equal to the root path of the deployment URL in Vercel.\n    ROOT_PATH = os.getenv(\"ROOT_PATH\", \"http://127.0.0.1:8000\")\n\n\nclass Settings(BaseSettings):\n    PROJECT_NAME: str = \"FastAPI App\"\n    PROJECT_DESCRIPTION: str = \"A simple FastAPI app\"\n    DB_URL: str = os.getenv(\"DB_URL\")\n    DB_API_KEY: str = os.getenv(\"DB_API_KEY\")\n    DB_EMAIL: str = os.getenv(\"DB_EMAIL\")\n    DB_PASSWORD: str = os.getenv(\"DB_PASSWORD\")\n    model_config = SettingsConfigDict(env_file=\".env\")\n    API_VERSION: str = \"/api/v1\"\n    ROOT: str = ROOT_PATH\n\n\nsettings = Settings()\n"
  },
  {
    "path": "apps/api/src/crud/__init__.py",
    "content": "from .crud_spell import spell\nfrom .crud_user import user\n"
  },
  {
    "path": "apps/api/src/crud/base.py",
    "content": "from typing import Generic, Optional, TypeVar\n\nfrom supabase_py_async import AsyncClient\n\nfrom src.schemas.base import CreateBase, ResponseBase, UpdateBase\n\nModelType = TypeVar(\"ModelType\", bound=ResponseBase)\nCreateSchemaType = TypeVar(\"CreateSchemaType\", bound=CreateBase)\nUpdateSchemaType = TypeVar(\"UpdateSchemaType\", bound=UpdateBase)\n\n\nclass CRUDBase(Generic[ModelType, CreateSchemaType, UpdateSchemaType]):\n    def __init__(self, model: type[ModelType]):\n        \"\"\"CRUD object with default methods to do CRUD ops\n\n        Args:\n            model (type[ModelType]): Model class type\n        \"\"\"\n        self.model = model\n\n    async def get(self, db: AsyncClient, *, id: str) -> Optional[ModelType]:\n        \"\"\"get by table_name by id\"\"\"\n        data, count = (\n            await db.table(self.model.table_name).select(\"*\").eq(\"id\", id).execute()\n        )\n        _, got = data\n        return self.model(**got[0]) if got else None\n\n    async def get_all(self, db: AsyncClient) -> list[ModelType]:\n        \"\"\"get all by table_name\"\"\"\n        data, count = await db.table(self.model.table_name).select(\"*\").execute()\n        _, got = data\n        return [self.model(**item) for item in got]\n\n    async def search_all(\n        self, db: AsyncClient, *, field: str, search_value: str, max_results: int\n    ) -> list[ModelType]:\n        \"\"\"search all by table_name\"\"\"\n        data, count = (\n            await db.table(self.model.table_name)\n            .select(\"*\")\n            .ilike(field, f\"%{search_value}%\")\n            .limit(max_results)\n            .execute()\n        )\n        _, got = data\n        return [self.model(**item) for item in got]\n\n    async def create(self, db: AsyncClient, *, obj_in: CreateSchemaType) -> ModelType:\n        \"\"\"create by CreateSchemaType\"\"\"\n        data, count = (\n            await db.table(self.model.table_name).insert(obj_in.model_dump()).execute()\n        )\n        _, created = data\n        return self.model(**created[0])\n\n    async def update(self, db: AsyncClient, *, obj_in: UpdateSchemaType) -> ModelType:\n        \"\"\"update by UpdateSchemaType\"\"\"\n        data, count = (\n            await db.table(self.model.table_name)\n            .update(obj_in.model_dump())\n            .eq(\"id\", obj_in.id)\n            .execute()\n        )\n        _, updated = data\n        return self.model(**updated[0])\n\n    async def delete(self, db: AsyncClient, *, id: str) -> ModelType:\n        \"\"\"remove by UpdateSchemaType\"\"\"\n        data, count = (\n            await db.table(self.model.table_name).delete().eq(\"id\", id).execute()\n        )\n        _, deleted = data\n        return self.model(**deleted[0])\n"
  },
  {
    "path": "apps/api/src/crud/crud_spell.py",
    "content": "from typing import Optional\n\nfrom fastapi import HTTPException\nfrom supabase_py_async import AsyncClient\n\nfrom src.crud.base import CRUDBase\nfrom src.schemas import Spell, SpellCreate, SpellUpdate\n\n\nclass CRUDSpell(CRUDBase[Spell, SpellCreate, SpellUpdate]):\n    async def get(self, db: AsyncClient, *, id: str) -> Optional[Spell]:\n        try:\n            return await super().get(db, id=id)\n        except Exception as e:\n            raise HTTPException(\n                status_code=404,\n                detail=f\"{e.code}: Spell not found. {e.details}\",\n            )\n\n    async def get_all(self, db: AsyncClient) -> list[Spell]:\n        try:\n            return await super().get_all(db)\n        except Exception as e:\n            raise HTTPException(\n                status_code=404,\n                detail=f\"An error occurred while fetching spells. {e}\",\n            )\n\n    async def search_all(\n        self, db: AsyncClient, *, field: str, search_value: str, max_results: int\n    ) -> list[Spell]:\n        try:\n            return await super().search_all(\n                db, field=field, search_value=search_value, max_results=max_results\n            )\n        except Exception as e:\n            raise HTTPException(\n                status_code=404,\n                detail=f\"An error occurred while searching for users. {e}\",\n            )\n\n\nspell = CRUDSpell(Spell)\n"
  },
  {
    "path": "apps/api/src/crud/crud_user.py",
    "content": "from typing import Optional\n\nfrom fastapi import HTTPException\nfrom supabase_py_async import AsyncClient\n\nfrom src.crud.base import CRUDBase\nfrom src.schemas import User, UserCreate, UserUpdate\n\n\nclass CRUDUser(CRUDBase[User, UserCreate, UserUpdate]):\n    async def create(self, db: AsyncClient, *, obj_in: UserCreate) -> User:\n        try:\n            return await super().create(db, obj_in=obj_in)\n        except Exception as e:\n            raise HTTPException(\n                status_code=400,\n                detail=f\"{e.code}: Failed to create user. {e.details}\",\n            )\n\n    async def get(self, db: AsyncClient, *, id: str) -> Optional[User]:\n        try:\n            return await super().get(db, id=id)\n        except Exception as e:\n            raise HTTPException(\n                status_code=404,\n                detail=f\"{e.code}: User not found. {e.details}\",\n            )\n\n    async def get_all(self, db: AsyncClient) -> list[User]:\n        try:\n            return await super().get_all(db)\n        except Exception as e:\n            raise HTTPException(\n                status_code=404,\n                detail=f\"An error occurred while fetching users. {e}\",\n            )\n\n    async def search_all(\n        self, db: AsyncClient, *, field: str, search_value: str, max_results: int\n    ) -> list[User]:\n        try:\n            return await super().search_all(\n                db, field=field, search_value=search_value, max_results=max_results\n            )\n        except Exception as e:\n            raise HTTPException(\n                status_code=404,\n                detail=f\"An error occurred while searching for users. {e}\",\n            )\n\n    async def update(self, db: AsyncClient, *, obj_in: UserUpdate) -> User:\n        return await super().update(db, obj_in=obj_in)\n\n    async def delete(self, db: AsyncClient, *, id: str) -> User:\n        return await super().delete(db, id=id)\n\n\nuser = CRUDUser(User)\n"
  },
  {
    "path": "apps/api/src/main.py",
    "content": "from fastapi import APIRouter, FastAPI\nfrom fastapi.middleware.cors import CORSMiddleware\nfrom fastapi.routing import APIRoute\n\nfrom src.api.api_v1.api import api_router\nfrom src.config import settings\n\ninfo_router = APIRouter()\n\n\n@info_router.get(\"/\", status_code=200, include_in_schema=False)\nasync def info():\n    return [{\"Status\": \"API Running\"}]\n\n\ndef custom_generate_unique_id(route: APIRoute):\n    \"\"\"Generates a custom ID when using the TypeScript Generator Client\n\n    Args:\n        route (APIRoute): The route to be customised\n\n    Returns:\n        str: tag-route_name, e.g. items-CreateItem\n    \"\"\"\n    return f\"{route.tags[0]}-{route.name}\"\n\n\ndef get_application():\n    _app = FastAPI(\n        title=settings.PROJECT_NAME,\n        description=settings.PROJECT_DESCRIPTION,\n        generate_unique_id_function=custom_generate_unique_id,\n        root_path=settings.ROOT,\n        root_path_in_servers=True,\n    )\n\n    _app.include_router(api_router, prefix=settings.API_VERSION)\n    _app.include_router(info_router, tags=[\"\"])\n\n    _app.add_middleware(\n        CORSMiddleware,\n        allow_origins=[\"*\"],\n        allow_credentials=True,\n        allow_methods=[\"*\"],\n        allow_headers=[\"*\"],\n    )\n\n    return _app\n\n\napp = get_application()\n"
  },
  {
    "path": "apps/api/src/schemas/__init__.py",
    "content": "from .spell import Spell, SpellCreate, SpellSearchResults, SpellUpdate\nfrom .user import User, UserCreate, UserSearchResults, UserUpdate\n"
  },
  {
    "path": "apps/api/src/schemas/base.py",
    "content": "from typing import ClassVar\nfrom pydantic import BaseModel, ConfigDict\n\n# Shared properties\n# class CRUDBaseModel(BaseModel):\n#     # where the data\n#     table_name: str\n\n\n# Properties to receive on item creation\n# in\nclass CreateBase(BaseModel):\n    # inherent to add more properties for creating\n    pass\n\n\n# Properties to receive on item update\n# in\nclass UpdateBase(BaseModel):\n    # inherent to add more properties for updating\n    id: str\n\n\n# response\n# Properties shared by models stored in DB\nclass InDBBase(BaseModel):\n    id: str\n    user_id: str\n    created_at: str\n\n\n# Properties to return to client\n# crud model\n# out\nclass ResponseBase(InDBBase):\n    # inherent to add more properties for responding\n    table_name: ClassVar[str] = \"ResponseBase\".lower()\n    Config: ClassVar[ConfigDict] = ConfigDict(\n        extra=\"ignore\", arbitrary_types_allowed=True\n    )\n"
  },
  {
    "path": "apps/api/src/schemas/spell.py",
    "content": "from typing import ClassVar, Sequence\n\nfrom pydantic import BaseModel\n\n\nclass Spell(BaseModel):\n    id: str\n    name: str\n    description: str\n    table_name: ClassVar[str] = \"spells\"\n\n\nclass SpellCreate(BaseModel):\n    id: str\n    name: str\n    description: str\n\n\nclass SpellUpdate(BaseModel):\n    id: str\n    name: str\n    description: str\n\n\nclass SpellSearchResults(BaseModel):\n    results: Sequence[Spell]\n"
  },
  {
    "path": "apps/api/src/schemas/user.py",
    "content": "from typing import ClassVar, Sequence\n\nfrom pydantic import BaseModel, EmailStr\n\n\nclass User(BaseModel):\n    id: str\n    forename: str\n    surname: str\n    email: EmailStr\n    table_name: ClassVar[str] = \"user\"\n\n\nclass UserCreate(BaseModel):\n    forename: str\n    surname: str\n    email: EmailStr\n\n\nclass UserUpdate(BaseModel):\n    forename: str\n    surname: str\n    email: EmailStr\n\n\nclass ResponseMessage(BaseModel):\n    message: str\n\n\nclass UserSearchResults(BaseModel):\n    results: Sequence[User]\n"
  },
  {
    "path": "apps/api/tests/__init__.py",
    "content": ""
  },
  {
    "path": "apps/api/tests/test_api.py",
    "content": "from src import __version__\n\n\ndef test_version():\n    assert __version__ == '0.1.0'\n"
  },
  {
    "path": "apps/api/vercel.json",
    "content": "{\n  \"version\": 2,\n  \"builds\": [\n    {\n      \"src\": \"/src/main.py\",\n      \"use\": \"@vercel/python\"\n    }\n  ],\n  \"routes\": [\n    {\n      \"src\": \"/(.*)\",\n      \"dest\": \"src/main.py\"\n    }\n  ],\n  \"env\": {\n    \"APP_MODULE\": \"src.main:app\"\n  }\n}\n"
  },
  {
    "path": "apps/docs/.vscode/extensions.json",
    "content": "{\n  \"recommendations\": [\"unifiedjs.vscode-mdx\", \"xyc.vscode-mdx-preview\"]\n}\n"
  },
  {
    "path": "apps/docs/api/spells/get-all-spells.mdx",
    "content": "---\nopenapi: get /api/v1/spells/get-all/\n---"
  },
  {
    "path": "apps/docs/api/spells/get-spell.mdx",
    "content": "---\nopenapi: get /api/v1/spells/get/\n---"
  },
  {
    "path": "apps/docs/api/spells/search-spells.mdx",
    "content": "---\nopenapi: get /api/v1/spells/search/\n---"
  },
  {
    "path": "apps/docs/api/users/create-user.mdx",
    "content": "---\nopenapi: post /api/v1/users/create\n---"
  },
  {
    "path": "apps/docs/api/users/get-all-users.mdx",
    "content": "---\nopenapi: get /api/v1/users/get-all/\n---"
  },
  {
    "path": "apps/docs/api/users/get-user.mdx",
    "content": "---\nopenapi: get /api/v1/users/get/\n---"
  },
  {
    "path": "apps/docs/api/users/search-users.mdx",
    "content": "---\nopenapi: get /api/v1/users/search/\n---"
  },
  {
    "path": "apps/docs/documentation/configuration/docs.mdx",
    "content": "---\ntitle: Documentation config\n\"og:title\": Mintlify setup and configuration\ndescription: Mintlify setup and configuration\n---\n\n## Introduction\n\nThe documentation site is built entirely using Mintlify. Mintlify docs are rendered from MDX files and configurations. Mintlify works with a Github integration to\nconstantly build an independent docs site based off your latest published repository.\n\nDocumentation can be edited in raw MDX, or directly through the Mintlify dashboard (which stays in sync with your local Github repo).\n\nMintlify is fast to setup and provides tonnes of features out-the-box without the need to pay for a subscription for the basic services.\n\nYou can run the **docs site only** by running the `pnpm run dev` command from a terminal within the `docs` directory.\n\n## Docs structure\n\nThe docs root directory is structured as follows:\n\n```\ndocs\n├── _images\n├── api\n├── configuration\n├── deployment\n├── logos\n├── *.mdx\n├── mint.json\n└── package.json\n```\n\nThe docs directory is relatively simple and is made mostly of MDX files. Some notable files are:\n\n| Item         | Description                                                 |\n| ------------ | ----------------------------------------------------------- |\n| api          | Automatically generated files (except for Introduction.mdx) |\n| mint.json    | Mintlify configuration object                               |\n| package.json | Scripts needed in the monorepo/for generating the API files |\n\n## Creating API endpoint documentation\n\nWe can leverage FastAPI's baked in OpenAPI support to automatically generate API documentation.\n\nUsing Mintlify's `@mintlify/scraping` package, we can scrape our FastAPI's OpenAPI schema to generate an interactive API documentation site.\n\n<Tip>\n  For a more detailed description, read the [official\n  documentation](https://mintlify.com/docs/api-playground/openapi/setup#create-mdx-files-for-openapi-endpoints)\n</Tip>\n\n### Generating OpenAPI schema\n\n#### Step 1: Generate MDX\n\nRun the `generate-api` scripts within the `package.json` to generate the required MDX\nfiles. There are two scripts here, one configured to use the production\n`OpenAPI.json` and the second configured to use the development version.\\\n\\\nIt is typically preferred to use the production version once any changes to\nyour API have been made and published.\n\n#### Step 2: Update mint.json\n\n<Steps>\n  <Step title=\"Add new MDX files to navigation\">\n  Upon generating the relevant API information, `@mintlify/scraping` helpfully outputs the suggested navigation to the terminal:\n\n```bash\nnavigation object suggestion:\n[\n  {\n    \"group\": \"users\",\n    \"pages\": [\n      \"api/users/get-user\",\n      \"api/users/get-all-users\",\n      \"api/users/search-users\",\n      \"api/users/create-user\"\n    ]\n  },\n  {\n    \"group\": \"spells\",\n    \"pages\": [\n      \"api/spells/get-spell\",\n      \"api/spells/get-all-spells\",\n      \"api/spells/search-spells\"\n    ]\n  }\n]\n```\n\nFor sake of simplicity, copy this navigation object suggestion and add it your `mint.json` under the `navigation` object:\n\n```json\n\"navigation\": [\n  {\n    \"group\": \"Getting Started\",\n    \"pages\": [\"documentation/introduction\", \"documentation/local-development\"]\n  },\n  {\n    \"group\": \"Configuration\",\n    \"pages\": [\n      \"documentation/configuration/turbo\",\n      \"documentation/configuration/fastapi\",\n      \"documentation/configuration/nextjs\",\n      \"documentation/configuration/docs\"\n    ]\n  },\n  {\n    \"group\": \"Deployment\",\n    \"pages\": [\n      \"documentation/deployment/vercel\",\n      \"documentation/deployment/deployment\"\n    ]\n  },\n  {\n    \"group\": \"API Reference\",\n    \"pages\": [\"api/introduction\"]\n  },\n  {\n    \"group\": \"Users\",\n    \"pages\": [\n      \"api/users/get-user\",\n      \"api/users/get-all-users\",\n      \"api/users/search-users\",\n      \"api/users/create-user\"\n    ]\n  },\n  {\n    \"group\": \"Spells\",\n    \"pages\": [\n      \"api/spells/get-spell\",\n      \"api/spells/get-all-spells\",\n      \"api/spells/search-spells\"\n    ]\n  }\n],\n```\n\n  </Step>\n    <Step title=\"Add OpenAPI endpoint to `mint.json`\">\n    Add the `openapi` key to your `mint.json`. This, preferably, can be linked to your published OpenAPI schema:\n\n    ```json\n    {\n      ...\n      \"openapi\":\"https://next-fast-turbo-api.vercel.app/openapi.json\"\n      ...\n    }\n    ```\n\n    This enables the generated MDX files to describe and interact with your API.\n\n    <Warning>\n      This has been hit and miss in the past for me. If doing this does not auto-populate your API reference with the documentation, the solution is to manually\\\n      create an `openapi.json` file in the `docs` root. Manually copy and paste/save your `openapi.json` into this file.\n    </Warning>\n    </Step>\n\n</Steps>\n"
  },
  {
    "path": "apps/docs/documentation/configuration/fastapi.mdx",
    "content": "---\ntitle: FastAPI config\n\"og:title\": \"FastAPI configuration and setup\"\ndescription: FastAPI configuration and setup\n---\n\n## Introduction\n\nThe backend uses [FastAPI](https://fastapi.tiangolo.com/). FastAPI is a modern, fast (high-performance), web framework for building APIs with Python 3.8+ based on standard Python type hints\n\nYou can run the **api only** by running the `pnpm run dev` command from a terminal within the `api` directory. Alternatively, you can directly run the `run.py` file.\n\n## API structure\n\nThe API root directory is structured as follows:\n\n```\napi\n├── src\n│   ├── api\n│   ├── crud\n│   ├── schemas\n│   ├── __init__.py\n│   ├── config.py\n│   └── main.py\n├── tests\n├── .env\n├── .env.example\n├── harry-potter-db-seed-spells.csv\n├── harry-potter-db-seed-users.csv\n├── package.json\n├── poetry.lock\n├── pyproject.toml\n├── requirements.txt\n├── run.py\n└── vercel.json\n```\n\n### Src directory\n\nThe `src` directory is where all the application code sits. Below briefly explains each folder/file\n\n| Item      | Description                                     |\n| --------- | ----------------------------------------------- |\n| api       | The API endpoints for the application           |\n| crud      | The CRUD operations used within the application |\n| schemas   | The schemas used within the application         |\n| config.py | Main application configuration                  |\n| main.py   | Application                                     |\n\n### Root directory\n\nThe root directory contains the typical files one would expect to see in a Python project. The below files are worth describing:\n\n| Item         | Description                                                                                                                                                                |\n| ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| package.json | Not typical in a Python programme; used due to the nature of the monorepo. Running `pnpm run dev` at the project root will execute the `dev` script in this `package.json` |\n| vercel.json  | The configuration for deploying the FastAPI aspect of the application to Vercel.                                                                                           |\n| \\*.csv       | Simple seed data for the database, sourced from the [Harry Potter API](https://hp-api.onrender.com/)                                                                       |\n\n## Dependencies\n\n### Python 3.9\n\nBecause the project is being deployed on Vercel, Python version `3.9` must be used as this is the latest supported version of Python. For more information, read the [official documentation](https://vercel.com/docs/functions/runtimes/python).\n\nIf deploying to somewhere other than Vercel, check which version of Python you may use and adjust the project according to your needs.\n\n### Supabase\n\nThe project uses [Supabase](https://supabase.com/) as a database. Since Planetscale [removed their free Hobby tier](https://planetscale.com/blog/planetscale-forever),\nSupabase has seemed like a good alternative to use. You do not have to use Supabase with the backend, but the project is written from the perspective of using it.\n\n<Tip>\n  If you are using Supabase,\n  [`supabase-py-async`](https://pypi.org/project/supabase-py-async/) is already\n  included as a project dependency within the `pyproject.toml`. If you are not\n  using Supabase, this can be removed.\n</Tip>\n\n### Poetry\n\n[Poetry](https://python-poetry.org/) is used to manage the virtual environment and project dependencies.\nA `requirements.txt` has been generated to enable the installation of Python packages via the `pip install` command.\n\nIf you do not use Poetry, you can remove the `poetry.lock` and `pyproject.toml` files.\n\n<Tip>You will need a `requirements.txt` when deploying. Vercel also accepts a `Pipenv` file if you use Pipenv, otherwise, you'll need the `requirements.txt` for the `api` to build correctly</Tip>\n\n## Adding your own endpoints\n\nGiven the project structure, there are three areas that you must be aware of when adding your own endpoints with new models. The main areas are:\n\n- Schemas\n- CRUD\n- API\n\n### Example: Creation of Spells endpoints\n\n#### Step 1: Create a schema\n\n<Steps>\n    <Step title=\"Add a schema\">\n    Add a new schema to the `schemas` directory.\n    \n    ```python src/schemas/spell.py\n    from typing import ClassVar, Sequence\n\n    from pydantic import BaseModel\n\n\n    class Spell(BaseModel):\n        id: str\n        name: str\n        description: str\n        table_name: ClassVar[str] = \"spells\"\n\n\n    class SpellCreate(BaseModel):\n        id: str\n        name: str\n        description: str\n\n\n    class SpellUpdate(BaseModel):\n        id: str\n        name: str\n        description: str\n\n\n    class SpellSearchResults(BaseModel):\n        results: Sequence[Spell]\n\n    ```\n\n    <Info>The `table_name` value needs to be included in the base `Spell` class. This **must** be the same as the name of the table created in Supabase. It is used in the CRUD operations to identify the table to work with.</Info>\n\n    | Item               | Description                                                                                 |\n    |--------------------|---------------------------------------------------------------------------------------------|\n    | `Spell`            | The base class describing the columns that will be in the Supabase table                    |\n    | SpellCreate        | The class for creating a new `Spell`                                                        |\n    | SpellUpdate        | The class for updating an existing `Spell`                                                  |\n    | SpellSearchResults | Describes how data will be returned in the API response. It will be a `Sequence` of `Spell` |\n\n    </Step>\n\n    <Step title=\"Add to __init__.py\">\n    To easily import the new `Spell` classes throughout our application, they need to be added to the `src/schemas/__init__.py` file.\n\n    ```python src/schemas/__init__.py\n    from .user import User, UserCreate, UserSearchResults, UserUpdate\n    from .spell import Spell, SpellCreate, SpellSearchResults, SpellUpdate\n    ```\n\n    This allows us to import from `src/schemas` like so:\n\n    ```python\n    from src.schemas import Spell, SpellCreate, SpellSearchResults, SpellUpdate\n    ```\n    </Step>\n\n</Steps>\n\n#### Step 2: Setup CRUD operations\n\nSpecific CRUD operations can be created for each endpoint. However, generic CRUD operations in `src/crud/base.py` can also be used without modification.\n\n<Steps>\n    <Step title=\"Create CRUD file\">\n    ```python src/crud/crud_spell.py\n    from fastapi import HTTPException\n    from supabase_py_async import AsyncClient\n\n    from src.crud.base import CRUDBase\n    from src.schemas import Spell, SpellCreate, SpellUpdate\n\n\n    class CRUDSpell(CRUDBase[Spell, SpellCreate, SpellUpdate]):\n        async def get(self, db: AsyncClient, *, id: str) -> Spell | None:\n            try:\n                return await super().get(db, id=id)\n            except Exception as e:\n                raise HTTPException(\n                    status_code=404,\n                    detail=f\"{e.code}: Spell not found. {e.details}\",\n                )\n\n        async def get_all(self, db: AsyncClient) -> list[Spell]:\n            try:\n                return await super().get_all(db)\n            except Exception as e:\n                raise HTTPException(\n                    status_code=404,\n                    detail=f\"An error occurred while fetching spells. {e}\",\n                )\n\n        async def search_all(\n            self, db: AsyncClient, *, field: str, search_value: str, max_results: int\n        ) -> list[Spell]:\n            try:\n                return await super().search_all(\n                    db, field=field, search_value=search_value, max_results=max_results\n                )\n            except Exception as e:\n                raise HTTPException(\n                    status_code=404,\n                    detail=f\"An error occurred while searching for spells. {e}\",\n                )\n\n\n    spell = CRUDSpell(Spell)\n    ```\n    The `CRUDSpell` class inherits from the `CRUDBase` class located in `src/crud/base.py`. The `Spell`, `SpellCreate` and `SpellUpdate` classes are passed to the `CRUDBase` class to specify the types of data that will be used in the CRUD operations.\n\n    The operations that will be used in the API endpoints are functions of the `CRUDSpell` class.\n\n    Finally, `spell` is an instance of `CRUDSpell`. We import this instance to use in the API endpoints like so: `spell.get_all(db)` or `spell.get(db, id=id)`.\n\n    <Note>\n    **This part of the project is intended to be read-only**, however, the `SpellCreate` and `SpellUpdate` classes are created in the schema regardless as they are required by the `CRUDBase` model's function arguments. `CRUDBase` can be refactored to have optional parameters, or a read-only version of the `CRUDBase` class can be created. This is beyond the scope of this project.\n    </Note>\n\n    </Step>\n\n    <Step title=\"Add to __init__.py\">\n    Similar to setting up the schemas, the `CRUDSpell` class needs to be added to the `src/crud/__init__.py` file.\n\n    ```python src/crud/__init__.py\n    from .crud_user import user\n    from .crud_spell import spell\n    ```\n    </Step>\n\n</Steps>\n\n#### Step 3: Create the API endpoints\n\n<Steps>\n    <Step title=\"Create the endpoints\">\n    Create the endpoints in the `src/api/api_v1/endpoints/spells.py` file.\n\n    ```python src/api/api_v1/endpoints/spells.py\n    from typing import Literal, Optional, Union\n\n    from fastapi import APIRouter, HTTPException\n\n    from src.api.deps import SessionDep\n    from src.crud import spell\n    from src.schemas import Spell, SpellSearchResults\n\n    router = APIRouter()\n\n\n    @router.get(\"/get/\", status_code=200, response_model=Spell)\n    async def get_spell(session: SessionDep, spell_id: str) -> Spell:\n        \"\"\"Returns a spell from a spell_id.\n\n        **Returns:**\n        - spell: spell object.\n        \"\"\"\n        return await spell.get(session, id=spell_id)\n\n\n    @router.get(\"/get-all/\", status_code=200, response_model=list[Spell])\n    async def get_all_spells(session: SessionDep) -> list[Spell]:\n        \"\"\"Returns a list of all spells.\n\n        **Returns:**\n        - list[spell]: List of all spells.\n        \"\"\"\n        return await spell.get_all(session)\n\n\n    @router.get(\"/search/\", status_code=200, response_model=SpellSearchResults)\n    async def search_spells(\n        session: SessionDep,\n        search_on: Literal[\"spells\", \"description\"] = \"spell\",\n        keyword: Optional[Union[str, int]] = None,\n        max_results: Optional[int] = 10,\n    ) -> SpellSearchResults:\n        \"\"\"\n        Search for spells based on a keyword and return the top `max_results` spells.\n\n        **Args:**\n        - keyword (str, optional): The keyword to search for. Defaults to None.\n        - max_results (int, optional): The maximum number of search results to return. Defaults to 10.\n        - search_on (str, optional): The field to perform the search on. Defaults to \"email\".\n\n        **Returns:**\n        - SpellSearchResults: Object containing a list of the top `max_results` spells that match the keyword.\n        \"\"\"\n        if not keyword:\n            results = await spell.get_all(session)\n            return SpellSearchResults(results=results)\n\n        results = await spell.search_all(\n            session, field=search_on, search_value=keyword, max_results=max_results\n        )\n\n        if not results:\n            raise HTTPException(\n                status_code=404, detail=\"No spells found matching the search criteria\"\n            )\n\n        return SpellSearchResults(results=results)\n    ```\n\n    Here we are calling `spell` object which we setup in step 2.\n\n    The `SessionDep` (located in `src/api/deps.py`) dependency is used to access the database.\n\n    The `response_model` parameter is used to specify the type of data that will be returned from the endpoint. This is used to generate TypeScript types for the frontend.\n    </Step>\n\n    <Step title=\"Add the endpoint to the router\">\n    To include the new endpoints in the API, it must be added to the API router, located in `src/api/api_v1/api.py`.\n\n    ```python src/api/api_v1/api.py\n    from fastapi import APIRouter\n    from src.api.api_v1.endpoints import users, spells\n\n    api_router = APIRouter()\n    api_router.include_router(users.router, prefix=\"/users\", tags=[\"users\"], responses={404: {\"description\": \"Not found\"}})\n    api_router.include_router(spells.router, prefix=\"/spells\", tags=[\"spells\"], responses={404: {\"description\": \"Not found\"}})\n    ```\n    </Step>\n\n</Steps>\n\n#### Step 4: Create the table in Supabase\n\n<Steps>\n    <Step title=\"Create the table\">\n        Create a new table in your Supabase dashboard. It is **imperative** that the table name matches the `table_name` value in the `Spell` class in `src/schemas/spell.py`.\n\n        Columns should be added to match the `Spell` class. For example, we have the following `Spell` class:\n\n        ```python\n        class Spell(BaseModel):\n            id: str\n            name: str\n            description: str\n            table_name: ClassVar[str] = \"spells\"\n        ```\n\n        In this example, the table should be named `spells` (table names are case-sensitive) with the columns `id`, `name`, and `description`. \\\n        \\\n        For data types, `id` can be automatically assigned - in this example, it is set to a `uuid`. The `name` and `description` fields are strings, therefore their column's type is set to `text`. The `id` column should be the primary key.\n        <Tip>You do not need to add the `table_name` column as this is used in the FastAPI code to identify the table to work with.</Tip>\n    </Step>\n    <Step title=\"Seed the table with data\">\n        The data can be seeded using the Supabase dashboard by uploading the `harry-potter-db-seed-spells.csv` file. For a more detailed explanation, please see the [official documentation](https://supabase.com/docs/guides/database/import-data#option-1-csv-import-via-supabase-dashboard)\n    </Step>\n    <Step title=\"Configure table security\">\n        The table security should be configured to allow the FastAPI application to access the data. By default, Supabase will have [RLS (Row Level Security)](https://supabase.com/docs/guides/auth/row-level-security) enabled.\\\n        \\\n        If left un-configured, the database will return an empty array. As this is a simple read-only project, I am turning `RLS` off. However, for true CRUD operations, it should be configured to use authentication which is beyond the scope of this project.\n\n        \\\n        To disable `RLS`, in the table settings, select `configure RLS` and then `disable RLS`.\\\n    </Step>\n    <Step title=\"Add table connection to .env\">\n        Once the table has been created, you must ensure that the `DB_URL` and `DB_API_KEY` parameters are populated in your `.env` file located in the root of the `API` directory.\\\n        \\\n        These values come from the Supabase dashboard by going to `settings` and then `API`. Copy the Project URL (`DB_URL`) and the Project API Key (`DB_API_KEY`).\n\n        <Info>\n            `DB_USERNAME` and `DB_PASSWORD` should also included in the `.env` as they are configured in the `src/config.py`. If you do not include these you will receive an error from Pydantic.\\\n            \\\n            Their inclusion is a pre-cursor to authentication, but they are not actually used in this project scaffold.\n        </Info>\n\n    </Step>\n\n</Steps>\n#### Step 5: Test your new endpoints\nYou can now test your new endpoints using the FastAPI Swagger UI or by making requests to the API.\n"
  },
  {
    "path": "apps/docs/documentation/configuration/nextjs.mdx",
    "content": "---\ntitle: Next.js config\n\"og:title\": \"Next.js config and setup\"\n\"description\": \"Next.js config and setup\"\n---\n\n## Introduction\n\nThe frontend uses the latest version of Next.js and TypeScript; it is configured using the latest [app router](https://nextjs.org/docs/app).\n\nYou can run the **frontend only** by running the `pnpm run dev` command from a terminal within the `web` directory. Alternatively, you can run the entire application by running `pnpm run dev` from the **root directory**.\n\n## App structure\n\nThe app root directory is structured as follows:\n\n```\nweb\n├── app\n├── components\n├── lib\n├── public\n├── .env\n├── .env.example\n├── .eslintrc.js\n├── components.json\n├── next.config.js\n├── package.json\n├── postcss.config.js\n├── README.md\n├── tailwind.config.js\n├── tsconfig.json\n└── yarn.lock\n```\n\n#### App\n\n| Item        | Description                                                                                          |\n| ----------- | ---------------------------------------------------------------------------------------------------- |\n| globals.css | Tailwind global config. Uses a generated theme from [ShadCN UI themes](https://ui.shadcn.com/themes) |\n| layout.tsx  | App layout                                                                                           |\n| page.tsx    | Landing page                                                                                         |\n\n#### Components\n\n| Item    | Description                                                                                                                   |\n| ------- | ----------------------------------------------------------------------------------------------------------------------------- |\n| layouts | The dashboard layout is stored which wraps the application `{children}` in `root/app/layout.tsx`                              |\n| theme   | The `ThemeProvider` component(s) that wrap the application.                                                                   |\n| ui      | Where `ShadCN` components are stored upon being generated. Configured by the `components.json` located in the `frontend root` |\n| \\*.tsx   | Components used within the application                                                                                        |\n\n#### Lib\n| Item        | Description                                                                                                      |\n| ----------- | ---------------------------------------------------------------------------------------------------------------- |\n| api         | The output generated by the `openapi` npm package. Configured in the `package.json` task named `generate-client` |\n| config      | Stores site config. Currently contains the setup for sidebar navigation                                          |\n| twConfig.ts | Tailwind colour config exported to an accessible Object. Used for assigning theme-aware colours in charts        |\n| utils.ts    | ShadCN utils                                                                                                     |\n\n\n\n## TypeScript from FastAPI\nAs FastAPI is based on the OpenAPI specification, you get automatic compatibility with many tools, including the automatic API docs (provided by Swagger UI).\n\nOne particular advantage that is not necessarily obvious is that you can generate clients (sometimes called SDKs ) for your API, for many different programming languages.\n\n<Note>For a more detailed explanation, see the [official FastAPI documentation](https://fastapi.tiangolo.com/advanced/generate-clients/#generate-a-typescript-client-with-the-preprocessed-openapi)</Note>\n\n## Why generate TypeScript?\nGenerating a TypeScript client for your FastAPI backend is a great way to ensure that your frontend and backend are always in sync. It is also a way to provide type hinting while writing your frontend code without needing a permanent reference to the API, or re-creating the schema using something like Zod.\n\n<Frame caption=\"Type hinting from the generated API client\"><img src=\"/_images/type-hinting.png\" /></Frame>\n\n### How to generate TypeScript\n<Steps>\n    <Step title=\"Configure and run generate-client task\">\n    There are two generate-client tasks configured in the `package.json`:\n    ```JSON\n    \"scripts\": {\n      ...\n      \"generate-client\": \"openapi --input https://next-fast-turbo.vercel.app/openapi.json --output ./lib/api/client --client axios --useOptions --useUnionTypes\",\n      \"generate-client:dev\": \"openapi --input http://127.0.0.0:8000/openapi.json --output ./lib/api/client --client axios --useOptions --useUnionTypes\"\n      ...\n    },\n    ```\n    The `generate-client` task is set to run off the production OpenAPI schema.\\\n    \\\n    The `generate-client:dev` task is set to use the localhost OpenAPI schema. This is useful for development, as it will use the latest schema from the backend.\n\n    Ensure your production API URL is configured, or that your local API URL is correct, and then run the relevant task.\n    </Step>\n    \n    <Step title=\"Update your root layout\">\n    \n    A key file to be aware of is the `OpenAPI.ts` which is generated in the `lib/api/client/core` directory. This file has the main configuration for the API connection as below:\n\n    ```tsx lib/api/client/core/OpenAPI.ts\n    export const OpenAPI: OpenAPIConfig = {\n      BASE: \"http://127.0.0.0:8000\",\n      VERSION: \"0.1.0\",\n      WITH_CREDENTIALS: false,\n      CREDENTIALS: \"include\",\n      TOKEN: undefined,\n      USERNAME: undefined,\n      PASSWORD: undefined,\n      HEADERS: undefined,\n      ENCODE_PATH: undefined,\n    };\n    ```\n\n    The problem with this is that we would want to differentiate between which API is being used. When the TypeScript is generated, the given OpenAPI URL is used as the base URL for the API. \n    This is not ideal for production, as you would want to use the production API URL, and vice versa in development.\n\n    You can override this by adding the following to your root `layout.tsx` file:\n\n    ```tsx layout.tsx\n    import { OpenAPI } from \"@/lib/api/client\";\n\n    if (process.env.NODE_ENV === \"production\") {\n      OpenAPI.BASE = \"https://next-fast-turbo.vercel.app\"\n    }\n\n    ```\n\n\n    </Step>\n</Steps>\n\n## Using the generated API\nOnce you have generated your TypeScript interface to your API, you can use it in your frontend code.\n\nIn its simplest form, you can import the generated API and use it as below:\n\n```tsx\nimport { UsersService } from \"@/lib/api/client\";\n\nconst response = await UsersService.usersSearchUsers({\n        keyword: \"keyword\",\n        searchOn: \"searchOn\",\n        maxResults: \"maxResults\",\n      });\n```\n\nYou can see this code being used in the `components/search-users.tsx` file, as part of the form's onSubmit function:\n\n```tsx\n  const onSubmit = async (data: z.infer<typeof FormSchema>) => {\n    try {\n      const maxResults = data.searchResults ? parseInt(data.searchResults) : 10;\n      const response = await UsersService.usersSearchUsers({\n        keyword: data.keyword,\n        searchOn: data.searchOn,\n        maxResults: maxResults,\n      });\n      setSearchResults(response);\n      setError(null);\n    } catch (error) {\n      setSearchResults({ results: [] });\n      setError(error);\n    }\n  };\n```\nThis code also imports the `UserSearchResults` type which is used to set the state of the search results:\n```tsx\nimport { UsersService, UserSearchResults } from \"@/lib/api/client\";\n\nconst [searchResults, setSearchResults] = React.useState<UserSearchResults>({\n    results: [],\n  });\n```\n\n\n## Important considerations\n- If you make changes to your API, you will need to re-generate the TypeScript interface.\n- Re-generating this interface will overwrite the existing files. If you want to modify anything (e.g. `api/client/core/OpenAPI.ts`) and have it persist, do this outside of the generated files. You can see this in action in the `root/app/layout.tsx` file."
  },
  {
    "path": "apps/docs/documentation/configuration/turbo.mdx",
    "content": "---\ntitle: Turbo config\n\"og:title\": \"Configuring Turbo for FastAPI, Next.js and Turborepo\"\ndescription: Configuring Turbo for FastAPI, Next.js and Turborepo.\n---\n\n## Introduction\nThis project was first created using the `create-turbo` npm package:\n\n<CodeGroup>\n    ```bash npm\n    npx create-turbo@latest\n    ```\n    \n    ```bash yarn\n    yarn dlx create-turbo@latest\n    ```\n    \n    ```bash pnpm\n    pnpm dlx create-turbo@latest\n    ```\n</CodeGroup>\n\n<Note>It is recommended that you read through the [official documentation](https://turbo.build/repo/docs/getting-started/create-new) to understand the breakdown of the monorepo.</Note>\n\n## Changes to the official Turbo starter\nThe official Turbo starter is a great starting point for a monorepo, but it has some configurations I did not need. As I will not be sharing code between the backend and frontend (nor the docs), I have **removed** the `packages/ui` directory.\n\nIf you want to **add a new package** to the project, please reference the [official documentation](https://turbo.build/repo/docs/handbook/sharing-code/internal-packages). \n\nFor quick reference:\n  1. Create a new folder in `packages/<folder>`\n  2. Add a `package.json`, with `name` and `types` pointing at `src/index.ts[x]`\n  3. Add `src/index.ts[x]`, with at least one named export\n  4. Install your packages from `root`\n\n\n## Turbo.json\nThe currently configured `turbo.json` does not have many changes from the official starter. The only change is the addition of the `globalEnv` key.\n\n```json\n{\n  \"globalEnv\": [\n    \"NODE_ENV\"\n  ],\n}\n```\nWithout adding these environment variables to the `globalEnv`, you will receive an eslint error when referencing variables in your `.env`, however, your code will still work.\n\n<Warning>\nThere are different ways that people solve this. While it's possible to use\\\n`\"globalDependencies\": [\"**/.env\"]`, that did not work in this project.\\\n</Warning>"
  },
  {
    "path": "apps/docs/documentation/deployment/deployment.mdx",
    "content": "---\ntitle: Deploying the monorepo\ndescription: Deploying your monorepo to Vercel/Mintlify\n\"og:title\": Deploying your monorepo to Vercel/Mintlify\n---\n\n## Introduction\n\nDeploying your monorepo to Vercel is relatively straightforward, but there are a handful of things to be aware of. \nThe frontend deployment is relatively straightforward, but the backend deployment can be a little more complex and need a bit more attention.\n\n<Note>For a more detailed guide on deploying a monorepo to Vercel, see the [official documentation](https://vercel.com/docs/monorepos/turborepo).</Note>\n\n## Prerequisites\nBefore continuing, ensure you have:\n- A [Vercel](https://vercel.com/) account. It is typically easiest to sign up with your GitHub account, as we'll also be deploying directly from the GitHub repository.\n- Published your repo to GitHub. If you haven't done this yet, you can follow the instructions [here](https://docs.github.com/en/get-started/quickstart/create-a-repo).\n- Optional. If you're planning to deploy your documentation site to Mintlify, you'll need to have a [Mintlify](https://mintlify.com/) account.\n\n## Frontend Deployment\n<Steps>\n    <Step title=\"Add new project in Vercel\">\n        Go to your [Vercel dashboard](https://vercel.com/dashboard) and click the `Add New...` button, and select `Project`.\n    </Step>\n\n    <Step title=\"Import your monorepo\">\n        Select the `Import Git Repository` option and select your repository from the list of repositories.\n    </Step>\n\n    <Step title=\"Configure Project\">\n        Vercel will automatically detect that you have a monorepo, and should have correctly populated all the required fields. \n        \n        The project root directory should be automatically detected, but if it isn't, you can manually set it to the folder where your frontend is stored. In this project, that is `apps/web`.\n\n        <Frame>\n            <img src=\"/_images/deploy-web-configure-project.png\" />\n        </Frame>        \n    </Step>    \n\n    <Step title=\"Deploy\">\n        Click the `Deploy` button to deploy your project.\n    </Step>    \n\n    <Step title=\"Add an Ignored Build Step\">\n        We don't want to continuously rebuild our frontend every time we push changes to the backend or documentation. To prevent this, we can add an ignored build step.\\\n        \\\n        From the newly deployed frontend dashboard, navigate to `Settings`, then to `Git`. Scroll down to the `Ignored Build Step` section and set the behaviour to \n        **Only build Turborepo app if there are changes**.\n\n        <Frame>\n            <img src=\"/_images/deploy-web-ignored-build-step.png\" />\n        </Frame>\n\n        <Note>For more information, see the [official documentation](https://vercel.com/docs/projects/overview#ignored-build-step).</Note>\n    </Step>\n</Steps> \n\n## Backend deployment\n<Steps>\n    <Step title=\"Add new project in Vercel\">\n        Go to your [Vercel dashboard](https://vercel.com/dashboard) and click the `Add New...` button, and select `Project`.\n    </Step>\n\n    <Step title=\"Import your monorepo\">\n        Select the `Import Git Repository` option and select your repository from the list of repositories.\n    </Step>\n\n    <Step title=\"Configure Project\">\n        Vercel will automatically detect that you have a monorepo, but for the backend we need to change the default configuration. \n        \n        - Configure your project name\n        - Change the `Framework Preset` to `Other` (there is currently no Python option)\n        - Change the `Root Directory` to the folder where your backend is stored. In this project, that is `apps/api`\n        - Add your Environment Variables\n\n        <Frame>\n            <img src=\"/_images/deploy-api-configure-project.png\" />\n        </Frame>        \n    </Step>    \n\n    <Step title=\"Deploy\">\n        Click the `Deploy` button to deploy your project. Once built, the API should be running at the URL provided.\n\n        <Frame>\n            <img src=\"/_images/deploy-api-running.png\" />\n        </Frame>\n    </Step>    \n\n    <Step title=\"Add an Ignored Build Step\">\n        We don't want to continuously rebuild our frontend every time we push changes to the backend or documentation. To prevent this, we can add an ignored build step.\\\n        \\\n        From the newly deployed frontend dashboard, navigate to `Settings`, then to `Git`. Scroll down to the `Ignored Build Step` section and set the behaviour to \n        **Only build Turborepo app if there are changes**.\n\n        <Frame>\n            <img src=\"/_images/deploy-web-ignored-build-step.png\" />\n        </Frame>\n\n        <Note>For more information, see the [official documentation](https://vercel.com/docs/projects/overview#ignored-build-step).</Note>\n    </Step>\n</Steps> \n\n\n## Documentation deployment\n<Note>For a more detailed explanation, visit the [offical documentation](https://mintlify.com/docs/quickstart)</Note>\n\nConnecting to an existing repository with Mintlify is a little bit tricky, as their walkthrough currently seems to only support creating a new repository. However, it is possible to connect an existing repository by following the steps below.\n\n<Steps>\n    <Step title=\"Sign in to Mintlify\">\n        Sign in to [Mintlify](https://mintlify.com/). You will further be prompted to **Sign in with GitHub**. Follow the onscreen instructions.\n    </Step>\n\n    <Step title=\"Select Monorepo\">\n        Configure your deployment to be pointed to your `docs` directory. Ensure **set up as a monorepo** is selected.\n\n        <Frame>\n            <img src=\"/_images/deploy-docs-select-repo.png\" />\n        </Frame>\n    </Step>\n   \n    <Step title=\"Install Mintlify app to GitHub\">\n        From the Mintlify dashboard, click **Things to Do** and then click **Enable automatic updates**.\n\n        <Frame>\n            <img src=\"/_images/deploy-docs-enable-auto-update.png\" />\n        </Frame>\n\n    </Step>\n\n</Steps> \n"
  },
  {
    "path": "apps/docs/documentation/introduction.mdx",
    "content": "---\ntitle: Introduction\n\"og:title\": \"Getting started with Next-Fast-Turbo\"\ndescription: A starter project for FastAPI, Next.js and Turborepo.\n---\n\n## What is Next-Fast-Turbo?\n\nNext-Fast-Turbo is designed as a personal starter kit for Next.js and FastAPI projects. It is a monorepo that includes a Next.js frontend and a FastAPI backend. The project is designed to be deployed to Vercel, but can be deployed to any platform that supports monorepos.\n\nThis documentation is not written to be a tutorial, but instead to be a reference for the project. It is designed to be a living document that can be updated as the project evolves.\n\n## Features\n\n**Frontend**\\\nThe Next.js application comes with a fully built frontend that includes:\n\n- A responsive layout\n- A dashboard/sidebar design\n- Pre-configured connection to the backend API\n- Autogenerated TypeScript types based off the FastAPI OpenAPI schema\n- A variety of design components, mostly from ShadCN UI (including chart examples)\n\n**Backend**\\\nThe FastAPI application comes with a fully built backend that includes:\n\n- Example endpoints\n- Pre-configured schema/crud operations\n- Easily extensible to add more endpoints\n\n**Documentation**\\\nBuilt using Mintlify, a fully responsive and configured documentation site that features:\n\n- A fully built documentation site\n- A variety of Mintlify components\n- A fully configured mint.json\n\n## Tech stack\n\nNext-Fast-Turbo is fully open-source built using the following technologies:\n\n**Frontend**\n\n- [Next.js](https://nextjs.org/) - Framework for building React applications\n- [Tailwind CSS](https://tailwindcss.com/) - CSS framework\n- [ShadCN UI](https://ui.shadcn.com/) - UI kit\n\n**Backend**\n\n- [FastAPI](https://fastapi.tiangolo.com/) - Python backend API\n\n**Documentation**\n\n- [Mintlify](https://mintlify.io/) - Documentation\n\n**Global**\n\n- [Vercel](https://vercel.com/) - hosting\n- [Turbo](https://turbo.build/repo) - monorepo\n\n## Getting started\n\n<CardGroup cols={2}>\n  <Card title=\"Local development\" icon=\"code\" href=\"local-development\">\n    Install the application locally\n  </Card>\n  <Card title=\"Deployment\" icon=\"code-branch\" href=\"deployment/vercel\">\n    Deploy the monorepo to Vercel\n  </Card>\n</CardGroup>\n"
  },
  {
    "path": "apps/docs/documentation/local-development.mdx",
    "content": "---\ntitle: \"Local Development\"\n\"og:title\": \"How to setup local development\"\ndescription: \"A guide on how to run the codebase locally.\"\n---\n\n## Introduction\n\nNext-Fast-Turbo 's codebase is set up in a monorepo (via [Turborepo](https://turbo.build/repo)) and is fully open-source.\nHere's the monorepo structure:\n\n```\napps\n├── api\n├── docs\n├── web\npackages\n├── eslint-config\n├── typescript-config\n```\n\nThe `apps` directory contains the code for:\n\n- `web`: The frontend of the Next-Fast-Turbo's application\n- `api`: Next-Fast-Turbo's FastAPI backend - written in Python\n- `docs`: Next-Fast-Turbo's documentation site\n\nThe `packages` directory contains the code for:\n\n- `eslint-config`: ESLint configurations for Next-Fast-Turbo's codebase. Boilerplate code included as part of the [create Turbo](https://turbo.build/repo/docs/getting-started/create-new) command\n- `typescript-config`: TypeScript configurations for Next-Fast-Turbo's codebase. Boilerplate code included as part of the [create Turbo](https://turbo.build/repo/docs/getting-started/create-new) command\n\n## Running Next-Fast-Turbo\n### Step 1: Local setup\n\n<Steps>\n  <Step title=\"Clone the repo\">\n    Clone the [Next-Fast-Turbo repo](https://github.com/cording12/next-fast-turbo.git).\n\n    ```bash\n    git clone https://github.com/cording12/next-fast-turbo.git app-name\n    ```    \n\n  </Step>\n  <Step title=\"Install dependencies\">    \n    Change to the root directory of the cloned repository and install the dependencies using the following command:\n\n    ```bash\n    cd app-name\n    pnpm install\n    ```      \n  </Step>    \n\n  <Step title=\"Open code-workspace\">\n    It is recommended to use the pre-configured Workspace stored in the `.vscode` folder at the project root.\n\n    Navigate to `app-name/.vscode/` and double click `next-fast-turbo.code-workspace` to open in VS Code, or, in VS Code navigate to **File** and then **Open Workspace from File**.\n\n    <Tip>You can rename this to match your project name. The extension, `code-workspace`, must stay the same, but it can be changed to `app-name.code-workspace`</Tip>\n  </Step>\n</Steps>\n\n### Step 2: Python setup\n<Note>\n  In a monorepo, VS Code sometimes uses the wrong Python interpreter, leading to **module not found** errors. You can open the `api` folder in its own VS Code window, but using\n  the pre-configured Workspace is recommended. \n</Note>\nWhile working on the Python backend, ensure that your terminal is activated in the correct folder. From the root, run the following command to change to the `api` directory:\n\n```bash\ncd apps/api\n```\n\n<Steps>\n  <Step title=\"Create a virtual environment\">\n    Create a virtual environment in the `api` directory:\n\n    <CodeGroup>\n    ```bash Poetry\n    poetry install\n    ```\n\n    ```bash Pip\n    python -m venv .venv\n    ```\n    </CodeGroup>\n\n  <Tip>\n    If you're using Poetry, you could receive an error noting incorrect format of the `poetry.lock` file. This is a version mismatch between the version installed and the version used to generate the lock file. You can fix this by deleting the `poetry.lock` file\n    and running `poetry install` again.\n  </Tip>\n\n\n  </Step>\n  <Step title=\"Install dependencies (if not using Poetry)\">    \n    Run the following command to install the Python dependencies:\n\n    ```bash\n    pip install -r requirements.txt\n    ```\n  </Step>\n\n  <Step title=\"Configure .env file\">\n    Create a `.env` file in the `api` directory and add the following environment variables:\n\n    ```env\n    DB_URL=supabase_url\n    DB_API_KEY=supabase_api_key\n    DB_EMAIl=email_address\n    DB_PASSWORD=password\n    ```\n\n    These can be placeholder values for now, but you'll need to replace them with your actual Supabase credentials (covered in step 3).\n\n  </Step>\n</Steps>\n\n\n### Step 3: Creating tables in Supabase\nNext-Fast-Turbo uses [Supabase](https://supabase.com/) as the database for the backend. You'll need to create a new project in Supabase and then create the required tables. To get this example running, you need to only create two tables in Supabase.\n<Steps>\n\n  <Step title=\"Create an account and new project\">\n    Visit [Supabase](https://supabase.com/) and register an account. Once you're logged in, create a new project and give it a name.\n    <Frame>\n      <img src=\"/_images/supabase-project-create.png\" />\n    </Frame>\n  </Step>\n\n  <Step title=\"Add credentials to `.env`\">\n    While your project is building, copy the `Project API Key` and `URL` values and add these to the `.env` file in the `api` directory, as described in step 3 of the [Python setup](#step-2-python-setup).\n    <Frame>\n      <img src=\"/_images/supabase-credentials.png\" />\n    </Frame>\n  </Step>\n  \n  <Step title=\"Create tables\">\n    The tables are seeded with the two `.csv` files located in the `api` root, but the tables must be created before seeding.\n    \n    From the dashboard, visit the `Table Editor` and click the `New table` button.     \n    <Frame>\n      <img src=\"/_images/supabase-new-table.png\" />\n    </Frame>\n\n    Create the `users` and `spells` tables with columns that match their respective CSV columns. Below is how they are both configured:\n\n    <Tabs>\n      <Tab title=\"Users table\">\n        <Frame>\n          <img src=\"/_images/supabase-create-user-table.png\" />\n        </Frame>\n      </Tab>\n      <Tab title=\"Spells table\">\n        <Frame>\n          <img src=\"/_images/supabase-create-spells-table.png\" />\n        </Frame>\n      </Tab>\n    </Tabs>\n    <Warning>\n      RLS is set to disabled on these tables. Authentication with Supabase was not in the scope for this project, but you will want to configure this yourself for anything more than this simple example.\n      You can read more about [RLS](https://supabase.com/docs/guides/auth/row-level-security) in the Supabase documentation.\n    </Warning>\n  </Step>\n\n  <Step title=\"Upload CSV seed data\">\n    Once the tables are created, you can seed them with the data from the `.csv` files. From the `Table Editor`, click the `Insert` button and select the relevant `.csv` file to upload.\n    <Frame>\n      <img src=\"/_images/supabase-upload-csv.png\" />\n    </Frame>\n  </Step>\n\n</Steps>\n\n### Step 4: Configure Turbo remote caching (optional)\nTurborepo can use a technique known as [Remote Caching](https://turbo.build/repo/docs/core-concepts/remote-caching) to share cache artifacts across machines, enabling you to share build caches with your team and CI/CD pipelines.\n\nBy default, Turborepo will cache locally. To enable Remote Caching you will need an account with Vercel.\n\n<Steps>\n  <Step title=\"Login via Turborepo CLI\">\n    From the project root, run the command:\n    ```bash    \n    npx turbo login\n    ```\n    This will authenticate the Turborepo CLI with your [Vercel account](https://vercel.com/docs/concepts/personal-accounts/overview).\n  </Step>\n  <Step title=\"Link your Turborepo to your Remote Cache\">\n  Link your Turborepo to your Remote Cache by running the following command from the root of your Turborepo:\n  ```bash\n  npx turbo link\n  ```\n  </Step>\n</Steps>\n\n### Step 5: Running everything\nTo make the most of Turbo's monorepo structure, you can run the frontend, backend and documentation site simultaneously. From the root, run the following command:\n\n```bash root\npnpm run dev\n```\n<Tip>You can still run each separately by running the task directly from the relevant `package.json` or by running the `pnpm run dev` command from a terminal activated in the desired target location</Tip>\n\n\n## Working with a monorepo in VS Code\n\nFor a better development experience, you can use VS Code Workspaces for the monorepo. This will allow you to run tasks and debug the codebase from a single window, while keeping things more organised.\n\nFurthermore, VS Code doesn't handle Python virtual environments particularly well when working within a monorepo. Running the `dev` command from the project root can make VS Code use your global Python installation, \ninstead of the `.venv` created in the `api` root. By using a Workspace, this alleviates the problem. \n\n<Note>For a more detailed guide on setting up a monorepo in VS Code, check out the [official Multi-root Workspaces](https://code.visualstudio.com/docs/editor/multi-root-workspaces) documentation</Note>\n\n### Step 1: Open the monorepo\nIn the `/.vscode/` directory, you'll find a `next-fast-turbo.code-workspace` file. Open this file in VS Code to open the monorepo Workspace.\n\n<Tabs>\n<Tab title=\"No code-workspace\">\n<Frame caption=\"Frontend (web) folder open without using the Workspace\">\n  <img src=\"/_images/no-workspace.png\" />\n</Frame>\n</Tab>\n\n<Tab title=\"With a code-workspace\">\n<Frame caption=\"Frontend (web) folder open with a Workspace\">\n  <img src=\"/_images/workspace.png\" />\n</Frame>\n</Tab>\n</Tabs>\n\n### Step 2: Running tasks\nVS Code will try to autodetect tasks from gulp, grunt, npm, and TypeScript project files across all folders in a workspace as well as search for tasks defined in tasks.json files. The location of tasks is indicated by a folder name suffix\n\n<Frame caption=\"Workspace tasks\">\n  <img src=\"/_images/tasks.png\" />\n</Frame>\n\nFrom the above example, you can see there are several configured tasks with the relevant folder name after the task name.\n\n### Step 3: Debugging\nWith multi-root workspaces, VS Code searches across all folders for `launch.json` debug configuration files and displays them with the folder name as a suffix. \nAdditionally VS Code will also display launch configurations defined in the workspace configuration file.\n\n<Frame caption=\"Run and debug panel\">\n  <img src=\"/_images/run-and-debug.png\" />\n</Frame>\n\nYou can still create [launch configurations](https://code.visualstudio.com/docs/editor/debugging#_launch-configurations) for each individual package in the monorepo and they will populate in the dropdown list automatically.\n\n#### Workspace launch configurations\nIf you want to create a Workspace level configuration with [compound launch](https://code.visualstudio.com/docs/editor/debugging#_compound-launch-configurations), you can edit the `next-fast-turbo.code-workspace` file and add the configurations you wish to launch.\n\n<Tip>You can also edit the Workspace configuration file via the Command Palette\\\n(Windows: Ctrl + Shift + P) and searching for `open workspace config`</Tip>\n\nA compound launch configuration can reference the individual launch configurations by name as long as the names are unique within the workspace, for example:\n\n```json\n{\n  \"launch\": {\n    \"version\": \"0.2.0\",\n    \"configurations\": [],\n    \"compounds\": [\n      {\n        \"name\": \"Launch Frontend and Backend\",\n        \"configurations\": [\"Next.js: Chrome\", \"Python: FastAPI\"]\n      }\n    ]\n  }\n}\n```\n\nFor a more detailed explanation, check out the [official documentation](https://code.visualstudio.com/docs/editor/multi-root-workspaces#_workspace-launch-configurations)\n\n### Optional: Extensions\n<AccordionGroup>\n  <Accordion title=\"Python Envy\">    \n      Helps VS Code identify the correct Python virtual environment when installed in the working directory. This is especially useful when working with Python in a monorepo, as it can be difficult for VS Code to manage multiple virtual environments.\n\n      [Python Envy](https://marketplace.visualstudio.com/items?itemName=teticio.python-envy)\n  </Accordion>\n  <Accordion title=\"Workspace Terminals (recommended)\">\n    <Frame caption=\"Workspace Terminals in VS Code\">\n      <img src=\"/_images/terminals.png\" />\n    </Frame>\n      Terminal management in a monorepo can become cumbersome. This extension automatically creates a terminal in each of your monorepo's directories and names them accordingly. This will allow you to run commands and tasks from a terminal that's already set up in the correct directory.\n\n      [Workspace Terminals](https://marketplace.visualstudio.com/items?itemName=joshx.workspace-terminals)\n  </Accordion>\n</AccordionGroup>\n\n\n## Next Steps\n\n<CardGroup cols={2}>\n  <Card title=\"Turbo config\" icon=\"code\" href=\"configuration/turbo\">\n    Configuring Turbo for your monorepo\n  </Card>\n  <Card title=\"FastAPI config\" icon=\"database\" href=\"configuration/fastapi\">\n    Configuring FastAPI\n  </Card>\n  <Card title=\"Frontend config\" icon=\"computer\" href=\"configuration/nextjs\">\n    Configuring Next.js\n  </Card>\n  <Card title=\"Documentation config\" icon=\"book\" href=\"configuration/docs\">\n    Configuring Mintlify for documentation\n  </Card>\n</CardGroup>\n\n"
  },
  {
    "path": "apps/docs/mint.json",
    "content": "{\n  \"$schema\": \"https://mintlify.com/schema.json\",\n  \"name\": \"Next-Fast-Turbo Docs\",\n  \"favicon\": \"/logos/logo.svg\",\n  \"logo\": {\n    \"light\": \"/logos/logo.svg\",\n    \"dark\": \"/logos/logo-light.svg\"\n  },\n  \"colors\": {\n    \"primary\": \"#7c3aed\",\n    \"light\": \"#af87ff\",\n    \"dark\": \"#1e293b\",\n    \"background\": {\n      \"dark\": \"#030712\",\n      \"light\": \"#ffffff\"\n    }\n  },\n  \"modeToggle\": {\n    \"default\": \"dark\"\n  },\n  \"topbarCtaButton\": {\n    \"name\": \"Dashboard\",\n    \"url\": \"https://next-fast-turbo-web.vercel.app/\"\n  },\n  \"tabs\": [\n    {\n      \"name\": \"API Reference\",\n      \"url\": \"api\"\n    }\n  ],\n  \"anchors\": [\n    {\n      \"name\": \"Documentation\",\n      \"icon\": \"book-open-cover\",\n      \"url\": \"documentation\"\n    },\n    {\n      \"name\": \"API Reference\",\n      \"icon\": \"rectangle-terminal\",\n      \"url\": \"api\"\n    }\n  ],\n  \"navigation\": [\n    {\n      \"group\": \"Getting Started\",\n      \"pages\": [\n        \"documentation/introduction\",\n        \"documentation/local-development\"\n      ]\n    },\n    {\n      \"group\": \"Configuration\",\n      \"pages\": [\n        \"documentation/configuration/turbo\",\n        \"documentation/configuration/fastapi\",\n        \"documentation/configuration/nextjs\",\n        \"documentation/configuration/docs\"\n      ]\n    },\n    {\n      \"group\": \"Deployment\",\n      \"pages\": [\n        \"documentation/deployment/deployment\"\n      ]\n    },\n    {\n      \"group\": \"Users\",\n      \"pages\": [\n        \"api/users/get-user\",\n        \"api/users/get-all-users\",\n        \"api/users/search-users\",\n        \"api/users/create-user\"\n      ]\n    },\n    {\n      \"group\": \"Spells\",\n      \"pages\": [\n        \"api/spells/get-spell\",\n        \"api/spells/get-all-spells\",\n        \"api/spells/search-spells\"\n      ]\n    }\n  ],\n  \"api\": {\n    \"maintainOrder\": true,\n    \"baseUrl\": \"https://next-fast-turbo-api.vercel.app\"\n  },\n  \"openapi\": \"https://next-fast-turbo-api.vercel.app/openapi.json\",\n  \"feedback\": {\n    \"thumbsRating\": true\n  },\n  \"footerSocials\": {\n    \"github\": \"https://github.com/cording12/next-fast-turbo\",\n    \"linkedin\": \"https://www.linkedin.com/in/jon-cording/\"\n  }\n}"
  },
  {
    "path": "apps/docs/openapi.json",
    "content": "{\n  \"openapi\": \"3.1.0\",\n  \"info\": {\n    \"title\": \"FastAPI App\",\n    \"description\": \"A simple FastAPI app\",\n    \"version\": \"0.1.0\"\n  },\n  \"servers\": [\n    {\n      \"url\": \"https://next-fast-turbo-api.vercel.app\"\n    }\n  ],\n  \"paths\": {\n    \"/api/v1/users/get/\": {\n      \"get\": {\n        \"tags\": [\n          \"users\"\n        ],\n        \"summary\": \"Get User\",\n        \"description\": \"Returns a user from a user_id.\\n\\n**Returns:**\\n- User: User object.\",\n        \"operationId\": \"users-get_user\",\n        \"parameters\": [\n          {\n            \"name\": \"user_id\",\n            \"in\": \"query\",\n            \"required\": true,\n            \"schema\": {\n              \"type\": \"string\",\n              \"title\": \"User Id\"\n            }\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Successful Response\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/User\"\n                }\n              }\n            }\n          },\n          \"404\": {\n            \"description\": \"Not found\"\n          },\n          \"422\": {\n            \"description\": \"Validation Error\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/HTTPValidationError\"\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"/api/v1/users/get-all/\": {\n      \"get\": {\n        \"tags\": [\n          \"users\"\n        ],\n        \"summary\": \"Get All Users\",\n        \"description\": \"Returns a list of all users.\\n\\n**Returns:**\\n- list[User]: List of all users.\",\n        \"operationId\": \"users-get_all_users\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Successful Response\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/User\"\n                  },\n                  \"type\": \"array\",\n                  \"title\": \"Response Users-Get All Users\"\n                }\n              }\n            }\n          },\n          \"404\": {\n            \"description\": \"Not found\"\n          }\n        }\n      }\n    },\n    \"/api/v1/users/search/\": {\n      \"get\": {\n        \"tags\": [\n          \"users\"\n        ],\n        \"summary\": \"Search Users\",\n        \"description\": \"Search for users based on a keyword and return the top `max_results` items.\\n\\n**Args:**\\n- keyword (str, optional): The keyword to search for. Defaults to None.\\n- max_results (int, optional): The maximum number of search results to return. Defaults to 10.\\n- search_on (str, optional): The field to perform the search on. Defaults to \\\"email\\\".\\n\\n**Returns:**\\n- UserSearchResults: Object containing a list of the top `max_results` items that match the keyword.\",\n        \"operationId\": \"users-search_users\",\n        \"parameters\": [\n          {\n            \"name\": \"search_on\",\n            \"in\": \"query\",\n            \"required\": false,\n            \"schema\": {\n              \"enum\": [\n                \"id\",\n                \"email\",\n                \"forename\",\n                \"surname\"\n              ],\n              \"type\": \"string\",\n              \"default\": \"email\",\n              \"title\": \"Search On\"\n            }\n          },\n          {\n            \"name\": \"keyword\",\n            \"in\": \"query\",\n            \"required\": false,\n            \"schema\": {\n              \"anyOf\": [\n                {\n                  \"type\": \"string\"\n                },\n                {\n                  \"type\": \"integer\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"title\": \"Keyword\"\n            }\n          },\n          {\n            \"name\": \"max_results\",\n            \"in\": \"query\",\n            \"required\": false,\n            \"schema\": {\n              \"anyOf\": [\n                {\n                  \"type\": \"integer\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"default\": 10,\n              \"title\": \"Max Results\"\n            }\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Successful Response\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/UserSearchResults\"\n                }\n              }\n            }\n          },\n          \"404\": {\n            \"description\": \"Not found\"\n          },\n          \"422\": {\n            \"description\": \"Validation Error\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/HTTPValidationError\"\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"/api/v1/users/create\": {\n      \"post\": {\n        \"tags\": [\n          \"users\"\n        ],\n        \"summary\": \"Create User\",\n        \"description\": \"Craete a new user.\\n\\n**Args:**\\n- user_in (UserCreate): JSON of the user to create. Forename, surname and email. Email must be unique.\\n\\n**Returns:**\\n- User: User object\",\n        \"operationId\": \"users-create_user\",\n        \"requestBody\": {\n          \"content\": {\n            \"application/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/UserCreate\"\n              }\n            }\n          },\n          \"required\": true\n        },\n        \"responses\": {\n          \"201\": {\n            \"description\": \"Successful Response\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/User\"\n                }\n              }\n            }\n          },\n          \"404\": {\n            \"description\": \"Not found\"\n          },\n          \"422\": {\n            \"description\": \"Validation Error\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/HTTPValidationError\"\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"/api/v1/spells/get/\": {\n      \"get\": {\n        \"tags\": [\n          \"spells\"\n        ],\n        \"summary\": \"Get Spell\",\n        \"description\": \"Returns a spell from a spell_id.\\n\\n**Returns:**\\n- spell: spell object.\",\n        \"operationId\": \"spells-get_spell\",\n        \"parameters\": [\n          {\n            \"name\": \"spell_id\",\n            \"in\": \"query\",\n            \"required\": true,\n            \"schema\": {\n              \"type\": \"string\",\n              \"title\": \"Spell Id\"\n            }\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Successful Response\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Spell\"\n                }\n              }\n            }\n          },\n          \"404\": {\n            \"description\": \"Not found\"\n          },\n          \"422\": {\n            \"description\": \"Validation Error\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/HTTPValidationError\"\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"/api/v1/spells/get-all/\": {\n      \"get\": {\n        \"tags\": [\n          \"spells\"\n        ],\n        \"summary\": \"Get All Spells\",\n        \"description\": \"Returns a list of all spells.\\n\\n**Returns:**\\n- list[spell]: List of all spells.\",\n        \"operationId\": \"spells-get_all_spells\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Successful Response\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/Spell\"\n                  },\n                  \"type\": \"array\",\n                  \"title\": \"Response Spells-Get All Spells\"\n                }\n              }\n            }\n          },\n          \"404\": {\n            \"description\": \"Not found\"\n          }\n        }\n      }\n    },\n    \"/api/v1/spells/search/\": {\n      \"get\": {\n        \"tags\": [\n          \"spells\"\n        ],\n        \"summary\": \"Search Spells\",\n        \"description\": \"Search for spells based on a keyword and return the top `max_results` items.\\n\\n**Args:**\\n- keyword (str, optional): The keyword to search for. Defaults to None.\\n- max_results (int, optional): The maximum number of search results to return. Defaults to 10.\\n- search_on (str, optional): The field to perform the search on. Defaults to \\\"email\\\".\\n\\n**Returns:**\\n- spellSearchResults: Object containing a list of the top `max_results` items that match the keyword.\",\n        \"operationId\": \"spells-search_spells\",\n        \"parameters\": [\n          {\n            \"name\": \"search_on\",\n            \"in\": \"query\",\n            \"required\": false,\n            \"schema\": {\n              \"enum\": [\n                \"id\",\n                \"spells\",\n                \"description\"\n              ],\n              \"type\": \"string\",\n              \"default\": \"spells\",\n              \"title\": \"Search On\"\n            }\n          },\n          {\n            \"name\": \"keyword\",\n            \"in\": \"query\",\n            \"required\": false,\n            \"schema\": {\n              \"anyOf\": [\n                {\n                  \"type\": \"string\"\n                },\n                {\n                  \"type\": \"integer\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"title\": \"Keyword\"\n            }\n          },\n          {\n            \"name\": \"max_results\",\n            \"in\": \"query\",\n            \"required\": false,\n            \"schema\": {\n              \"anyOf\": [\n                {\n                  \"type\": \"integer\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"default\": 10,\n              \"title\": \"Max Results\"\n            }\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Successful Response\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/SpellSearchResults\"\n                }\n              }\n            }\n          },\n          \"404\": {\n            \"description\": \"Not found\"\n          },\n          \"422\": {\n            \"description\": \"Validation Error\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/HTTPValidationError\"\n                }\n              }\n            }\n          }\n        }\n      }\n    }\n  },\n  \"components\": {\n    \"schemas\": {\n      \"HTTPValidationError\": {\n        \"properties\": {\n          \"detail\": {\n            \"items\": {\n              \"$ref\": \"#/components/schemas/ValidationError\"\n            },\n            \"type\": \"array\",\n            \"title\": \"Detail\"\n          }\n        },\n        \"type\": \"object\",\n        \"title\": \"HTTPValidationError\"\n      },\n      \"Spell\": {\n        \"properties\": {\n          \"id\": {\n            \"type\": \"string\",\n            \"title\": \"Id\"\n          },\n          \"name\": {\n            \"type\": \"string\",\n            \"title\": \"Name\"\n          },\n          \"description\": {\n            \"type\": \"string\",\n            \"title\": \"Description\"\n          }\n        },\n        \"type\": \"object\",\n        \"required\": [\n          \"id\",\n          \"name\",\n          \"description\"\n        ],\n        \"title\": \"Spell\"\n      },\n      \"SpellSearchResults\": {\n        \"properties\": {\n          \"results\": {\n            \"items\": {\n              \"$ref\": \"#/components/schemas/Spell\"\n            },\n            \"type\": \"array\",\n            \"title\": \"Results\"\n          }\n        },\n        \"type\": \"object\",\n        \"required\": [\n          \"results\"\n        ],\n        \"title\": \"SpellSearchResults\"\n      },\n      \"User\": {\n        \"properties\": {\n          \"id\": {\n            \"type\": \"string\",\n            \"title\": \"Id\"\n          },\n          \"forename\": {\n            \"type\": \"string\",\n            \"title\": \"Forename\"\n          },\n          \"surname\": {\n            \"type\": \"string\",\n            \"title\": \"Surname\"\n          },\n          \"email\": {\n            \"type\": \"string\",\n            \"format\": \"email\",\n            \"title\": \"Email\"\n          }\n        },\n        \"type\": \"object\",\n        \"required\": [\n          \"id\",\n          \"forename\",\n          \"surname\",\n          \"email\"\n        ],\n        \"title\": \"User\"\n      },\n      \"UserCreate\": {\n        \"properties\": {\n          \"forename\": {\n            \"type\": \"string\",\n            \"title\": \"Forename\"\n          },\n          \"surname\": {\n            \"type\": \"string\",\n            \"title\": \"Surname\"\n          },\n          \"email\": {\n            \"type\": \"string\",\n            \"format\": \"email\",\n            \"title\": \"Email\"\n          }\n        },\n        \"type\": \"object\",\n        \"required\": [\n          \"forename\",\n          \"surname\",\n          \"email\"\n        ],\n        \"title\": \"UserCreate\"\n      },\n      \"UserSearchResults\": {\n        \"properties\": {\n          \"results\": {\n            \"items\": {\n              \"$ref\": \"#/components/schemas/User\"\n            },\n            \"type\": \"array\",\n            \"title\": \"Results\"\n          }\n        },\n        \"type\": \"object\",\n        \"required\": [\n          \"results\"\n        ],\n        \"title\": \"UserSearchResults\"\n      },\n      \"ValidationError\": {\n        \"properties\": {\n          \"loc\": {\n            \"items\": {\n              \"anyOf\": [\n                {\n                  \"type\": \"string\"\n                },\n                {\n                  \"type\": \"integer\"\n                }\n              ]\n            },\n            \"type\": \"array\",\n            \"title\": \"Location\"\n          },\n          \"msg\": {\n            \"type\": \"string\",\n            \"title\": \"Message\"\n          },\n          \"type\": {\n            \"type\": \"string\",\n            \"title\": \"Error Type\"\n          }\n        },\n        \"type\": \"object\",\n        \"required\": [\n          \"loc\",\n          \"msg\",\n          \"type\"\n        ],\n        \"title\": \"ValidationError\"\n      }\n    }\n  }\n}"
  },
  {
    "path": "apps/docs/package.json",
    "content": "{\n    \"name\": \"docs\",\n    \"version\": \"0.1.0\",\n    \"scripts\": {\n        \"dev\": \"mintlify dev --port 3001\",\n        \"generate-api\": \"npx @mintlify/scraping@latest openapi-file https://next-fast-turbo-api.vercel.app/openapi.json --outDir ./api/\",\n        \"generate-api:dev\": \"npx @mintlify/scraping@latest openapi-file https://127.0.0.1:8000/openapi.json --outDir ./api/\"\n    },\n    \"dependencies\": {\n        \"@mintlify/scraping\": \"^3.0.88\",\n        \"mintlify\": \"^4.0.127\"\n    }\n}"
  },
  {
    "path": "apps/web/.eslintrc.js",
    "content": "/** @type {import(\"eslint\").Linter.Config} */\nmodule.exports = {\n  root: true,\n  extends: [\"@repo/eslint-config/next.js\"],\n  parser: \"@typescript-eslint/parser\",\n  parserOptions: {\n    project: true,\n  },\n};\n"
  },
  {
    "path": "apps/web/.vscode/launch.json",
    "content": "{\n  \"version\": \"0.2.0\",\n  \"configurations\": [\n    {\n      \"name\": \"Next.js: Chrome\",\n      \"type\": \"node-terminal\",\n      \"request\": \"launch\",\n      \"command\": \"pnpm run dev\",\n      \"serverReadyAction\": {\n        \"pattern\": \"- Local:.+(https?://.+)\",\n        \"uriFormat\": \"%s\",\n        \"action\": \"debugWithChrome\",\n        \"webRoot\": \"${workspaceFolder}\"\n      }\n    }\n  ]\n}\n"
  },
  {
    "path": "apps/web/app/globals.css",
    "content": "@tailwind base;\n@tailwind components;\n@tailwind utilities;\n@import \"../components/theme/theme.css\";\n\n@layer base {\n  * {\n    @apply border-border;\n  }\n  body {\n    @apply bg-background text-foreground;\n  }\n}"
  },
  {
    "path": "apps/web/app/layout.tsx",
    "content": "import \"./globals.css\";\nimport type { Metadata } from \"next\";\nimport { Inter as FontSans } from \"next/font/google\";\nimport { DashboardLayout } from \"@/components/layouts/dashboard\";\nimport { cn } from \"@/lib/utils\";\nimport { ThemeProvider } from \"@/components/theme/theme-provider\";\nimport { OpenAPI } from \"@/lib/api/client\";\nimport { TailwindIndicator } from \"@/components/tailwind-indicator\";\n\nexport const fontSans = FontSans({\n  subsets: [\"latin\"],\n  variable: \"--font-sans\",\n});\n\nif (process.env.NODE_ENV === \"production\") {\n  OpenAPI.BASE = \"https://next-fast-turbo.vercel.app\";\n}\n\nconsole.log(\"Using OpenAPI.base\", OpenAPI.BASE);\n\nexport const metadata: Metadata = {\n  title: \"Next-Fast-Turbo\",\n  description: \"A Next.js, FastAPI and Turbo project scaffol\",\n  icons: {\n    icon: [\"/favicon.png\"],\n  },\n};\n\nexport default function RootLayout({\n  children,\n}: {\n  children: React.ReactNode;\n}): JSX.Element {\n  return (\n    <html lang=\"en\" suppressHydrationWarning>\n      <body className={cn(fontSans.variable, \"bg-background font-sans\")}>\n        <ThemeProvider\n          attribute=\"class\"\n          defaultTheme=\"system\"\n          enableSystem\n          disableTransitionOnChange\n        >\n          <DashboardLayout>{children}</DashboardLayout>\n          <TailwindIndicator />\n        </ThemeProvider>\n      </body>\n    </html>\n  );\n}\n"
  },
  {
    "path": "apps/web/app/page.tsx",
    "content": "import { CardsStats } from \"./placeholder-stats\";\nimport SearchUsers from \"@/components/search-users\";\n\nexport default async function Page() {\n  return (\n    <div className=\"flex flex-col gap-4\">\n      <CardsStats />\n      <SearchUsers />\n    </div>\n  );\n}\n"
  },
  {
    "path": "apps/web/app/placeholder-stats.tsx",
    "content": "// Example cards from ShadCN: https://github.com/shadcn-ui/ui/tree/0fae3fd93ae749aca708bdfbbbeddc5d576bfb2e/apps/www/registry/default/example/cards\nimport { FlexWrapper } from \"@/components/flex-wrapper\";\nimport { DemoRevenue } from \"@/components/demo-revenue\";\nimport { DemoSubscriptions } from \"@/components/demo-subscriptions\";\nimport { DemoExercise } from \"@/components/demo-exercise\";\nimport { DemoGoal } from \"@/components/demo-goal\";\n\nexport function CardsStats() {\n  return (\n    <FlexWrapper columns=\"4\">\n      <DemoRevenue />\n      <DemoSubscriptions />\n      <DemoExercise />\n      <DemoGoal />\n    </FlexWrapper>\n  );\n}\n"
  },
  {
    "path": "apps/web/app/settings/page.tsx",
    "content": "export default function Page() {\n  return <div>Settings page</div>;\n}\n"
  },
  {
    "path": "apps/web/components/demo-exercise.tsx",
    "content": "\"use client\";\n// Example data from ShadCN: https://github.com/shadcn-ui/ui/blob/0fae3fd93ae749aca708bdfbbbeddc5d576bfb2e/apps/www/registry/default/example/cards/stats.tsx#L61\n\nimport {\n  Card,\n  CardContent,\n  CardDescription,\n  CardHeader,\n  CardTitle,\n} from \"@/components/ui/card\";\nimport { Line, LineChart, ResponsiveContainer, Tooltip } from \"recharts\";\nimport { twColourConfig } from \"@/lib/twConfig\";\n\nconst timeSeriesData = [\n  {\n    average: 400,\n    today: 240,\n  },\n  {\n    average: 300,\n    today: 139,\n  },\n  {\n    average: 200,\n    today: 980,\n  },\n  {\n    average: 278,\n    today: 390,\n  },\n  {\n    average: 189,\n    today: 480,\n  },\n  {\n    average: 239,\n    today: 380,\n  },\n  {\n    average: 349,\n    today: 430,\n  },\n];\n\nexport function DemoExercise() {\n  return (\n    <Card className=\"w-full text-left\">\n      <CardHeader>\n        <CardTitle>Exercise Minutes</CardTitle>\n        <CardDescription>\n          Your exercise minutes are ahead of where you normally are.\n        </CardDescription>\n      </CardHeader>\n      <CardContent className=\"pb-4\">\n        {/* <div className=\"h-auto\"> */}\n        <div className=\"h-[140px]\">\n          <ResponsiveContainer width=\"100%\" height=\"100%\">\n            <LineChart\n              data={timeSeriesData}\n              margin={{\n                top: 5,\n                right: 10,\n                left: 10,\n                bottom: 0,\n              }}\n            >\n              <Tooltip\n                content={({ active, payload }) => {\n                  if (active && payload && payload.length) {\n                    return (\n                      <div className=\"rounded-lg border bg-background p-2 shadow-sm\">\n                        <div className=\"grid grid-cols-2 gap-2\">\n                          <div className=\"flex flex-col\">\n                            <span className=\"text-[0.70rem] uppercase text-muted-foreground\">\n                              Average\n                            </span>\n                            <span className=\"font-bold text-muted-foreground\">\n                              {payload[0].value}\n                            </span>\n                          </div>\n                          <div className=\"flex flex-col\">\n                            <span className=\"text-[0.70rem] uppercase text-muted-foreground\">\n                              Today\n                            </span>\n                            <span className=\"font-bold\">\n                              {payload[1].value}\n                            </span>\n                          </div>\n                        </div>\n                      </div>\n                    );\n                  }\n                  return null;\n                }}\n              />\n              <Line\n                type=\"monotone\"\n                strokeWidth={2}\n                dataKey=\"average\"\n                activeDot={{\n                  r: 6,\n                  style: {\n                    fill: `${twColourConfig.primary.DEFAULT}`,\n                    opacity: 0.25,\n                  },\n                }}\n                stroke={twColourConfig.primary.DEFAULT}\n                opacity={0.25}\n              />\n              <Line\n                type=\"monotone\"\n                dataKey=\"today\"\n                strokeWidth={2}\n                activeDot={{\n                  r: 8,\n                  style: { fill: `${twColourConfig.primary.DEFAULT}` },\n                }}\n                stroke={twColourConfig.primary.DEFAULT}\n              />\n            </LineChart>\n          </ResponsiveContainer>\n        </div>\n      </CardContent>\n    </Card>\n  );\n}\n"
  },
  {
    "path": "apps/web/components/demo-goal.tsx",
    "content": "\"use client\";\n// https://github.com/shadcn-ui/ui/blob/0fae3fd93ae749aca708bdfbbbeddc5d576bfb2e/apps/www/registry/default/example/cards/activity-goal.tsx\nimport * as React from \"react\";\nimport { Minus, Plus } from \"lucide-react\";\nimport { Bar, BarChart, ResponsiveContainer } from \"recharts\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n  Card,\n  CardContent,\n  CardDescription,\n  CardFooter,\n  CardHeader,\n  CardTitle,\n} from \"@/components/ui/card\";\nimport { twColourConfig } from \"@/lib/twConfig\";\n\nconst data = [\n  {\n    goal: 400,\n  },\n  {\n    goal: 300,\n  },\n  {\n    goal: 200,\n  },\n  {\n    goal: 300,\n  },\n  {\n    goal: 200,\n  },\n  {\n    goal: 278,\n  },\n  {\n    goal: 189,\n  },\n  {\n    goal: 239,\n  },\n  {\n    goal: 300,\n  },\n  {\n    goal: 200,\n  },\n  {\n    goal: 278,\n  },\n  {\n    goal: 189,\n  },\n  {\n    goal: 349,\n  },\n];\n\nexport function DemoGoal() {\n  const [goal, setGoal] = React.useState(350);\n\n  function onClick(adjustment: number) {\n    setGoal(Math.max(200, Math.min(400, goal + adjustment)));\n  }\n\n  return (\n    <Card className=\"w-full\">\n      <CardHeader className=\"pb-4\">\n        <CardTitle className=\"text-base\">Move Goal</CardTitle>\n        <CardDescription>Set your daily activity goal.</CardDescription>\n      </CardHeader>\n      <CardContent className=\"pb-2\">\n        <div className=\"flex items-center justify-center space-x-2\">\n          <Button\n            variant=\"outline\"\n            size=\"icon\"\n            className=\"h-8 w-8 shrink-0 rounded-full\"\n            onClick={() => onClick(-10)}\n            disabled={goal <= 200}\n          >\n            <Minus className=\"h-4 w-4\" />\n            <span className=\"sr-only\">Decrease</span>\n          </Button>\n          <div className=\"flex-1 text-center\">\n            <div className=\"text-5xl font-bold tracking-tighter\">{goal}</div>\n            <div className=\"text-[0.70rem] uppercase text-muted-foreground\">\n              Calories/day\n            </div>\n          </div>\n          <Button\n            variant=\"outline\"\n            size=\"icon\"\n            className=\"h-8 w-8 shrink-0 rounded-full\"\n            onClick={() => onClick(10)}\n            disabled={goal >= 400}\n          >\n            <Plus className=\"h-4 w-4\" />\n            <span className=\"sr-only\">Increase</span>\n          </Button>\n        </div>\n        <div className=\"my-3 h-[60px]\">\n          <ResponsiveContainer width=\"100%\" height=\"100%\">\n            <BarChart data={data}>\n              <Bar\n                dataKey=\"goal\"\n                style={{\n                  fill: `${twColourConfig.primary.DEFAULT}`,\n                  opacity: 0.2,\n                }}\n              />\n            </BarChart>\n          </ResponsiveContainer>\n        </div>\n      </CardContent>\n      <CardFooter>\n        <Button className=\"w-full\">Set Goal</Button>\n      </CardFooter>\n    </Card>\n  );\n}\n"
  },
  {
    "path": "apps/web/components/demo-revenue.tsx",
    "content": "\"use client\";\n// Example data from ShadCN: https://github.com/shadcn-ui/ui/blob/0fae3fd93ae749aca708bdfbbbeddc5d576bfb2e/apps/www/registry/default/example/cards/stats.tsx#L61\n\nimport { Card, CardContent, CardHeader, CardTitle } from \"@/components/ui/card\";\nimport { Line, LineChart, ResponsiveContainer } from \"recharts\";\nimport { twColourConfig } from \"@/lib/twConfig\";\n\nconst data = [\n  {\n    revenue: 10400,\n    subscription: 240,\n  },\n  {\n    revenue: 14405,\n    subscription: 300,\n  },\n  {\n    revenue: 9400,\n    subscription: 200,\n  },\n  {\n    revenue: 8200,\n    subscription: 278,\n  },\n  {\n    revenue: 7000,\n    subscription: 189,\n  },\n  {\n    revenue: 9600,\n    subscription: 239,\n  },\n  {\n    revenue: 11244,\n    subscription: 278,\n  },\n  {\n    revenue: 26475,\n    subscription: 189,\n  },\n];\n\nexport function DemoRevenue() {\n  return (\n    <Card className=\"w-full\">\n      <CardHeader className=\"flex flex-row justify-between space-y-0 pb-4\">\n        <CardTitle className=\"text-base font-normal\">Total Revenue</CardTitle>\n      </CardHeader>\n      <CardContent className=\"text-left\">\n        <div className=\"text-2xl font-bold\">$15,231.89</div>\n        <p className=\"text-xs text-muted-foreground\">+20.1% from last month</p>\n        <div className=\"h-[140px]\">\n          <ResponsiveContainer width=\"100%\" height=\"100%\">\n            <LineChart\n              data={data}\n              margin={{\n                top: 5,\n                right: 10,\n                left: 10,\n                bottom: 0,\n              }}\n            >\n              <Line\n                type=\"monotone\"\n                strokeWidth={2}\n                dataKey=\"revenue\"\n                activeDot={{\n                  r: 6,\n                  style: {\n                    fill: `${twColourConfig.primary.DEFAULT}`,\n                    opacity: 0.25,\n                  },\n                }}\n                stroke={twColourConfig.primary.DEFAULT}\n              />\n            </LineChart>\n          </ResponsiveContainer>\n        </div>\n      </CardContent>\n    </Card>\n  );\n}\n"
  },
  {
    "path": "apps/web/components/demo-subscriptions.tsx",
    "content": "\"use client\";\n// Example data from ShadCN: https://github.com/shadcn-ui/ui/blob/0fae3fd93ae749aca708bdfbbbeddc5d576bfb2e/apps/www/registry/default/example/cards/stats.tsx#L61\n\nimport { Card, CardContent, CardHeader, CardTitle } from \"@/components/ui/card\";\nimport { Bar, BarChart, ResponsiveContainer } from \"recharts\";\nimport { twColourConfig } from \"@/lib/twConfig\";\n\nconst data = [\n  {\n    revenue: 10400,\n    subscription: 240,\n  },\n  {\n    revenue: 14405,\n    subscription: 300,\n  },\n  {\n    revenue: 9400,\n    subscription: 200,\n  },\n  {\n    revenue: 8200,\n    subscription: 278,\n  },\n  {\n    revenue: 7000,\n    subscription: 189,\n  },\n  {\n    revenue: 9600,\n    subscription: 239,\n  },\n  {\n    revenue: 11244,\n    subscription: 278,\n  },\n  {\n    revenue: 26475,\n    subscription: 189,\n  },\n];\n\nexport function DemoSubscriptions() {\n  return (\n    <Card className=\"w-full\">\n      <CardHeader className=\"flex flex-row items-center justify-between space-y-0 pb-2\">\n        <CardTitle className=\"text-base font-normal\">Subscriptions</CardTitle>\n      </CardHeader>\n      <CardContent className=\"text-left\">\n        <div className=\"text-2xl font-bold\">+2350</div>\n        <p className=\"text-xs text-muted-foreground\">+180.1% from last month</p>\n        <div className=\"mt-4 h-[110px]\">\n          <ResponsiveContainer width=\"100%\" height=\"100%\">\n            <BarChart data={data}>\n              <Bar\n                dataKey=\"subscription\"\n                fill={twColourConfig.primary.DEFAULT}\n              />\n            </BarChart>\n          </ResponsiveContainer>\n        </div>\n      </CardContent>\n    </Card>\n  );\n}\n"
  },
  {
    "path": "apps/web/components/flex-wrapper.tsx",
    "content": "import { cn } from \"@/lib/utils\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport { ReactNode, Children } from \"react\";\n\nconst flexVariants = cva(\"\", {\n  variants: {\n    columns: {\n      default: \"\",\n      \"1\": \"flex-1 basis-full\",\n      \"2\": \"flex-1 basis-full sm:basis-[48%]\",\n      \"3\": \"flex-1 basis-full sm:basis-[48%] md:basis-[32%]\",\n      \"4\": \"flex-1 basis-full sm:basis-[48%] md:basis-[32%] lg:basis-[24%]\",\n      \"5\": \"flex-1 basis-full sm:basis-[48%] md:basis-[32%] lg:basis-[19%]\",\n      \"6\": \"flex-1 basis-full sm:basis-[48%] md:basis-[32%] lg:basis-[19%] xl:basis-[12%]\",\n    },\n    horizontal_position: {\n      start: \"justify-start\",\n      center: \"justify-center text-center\",\n      end: \"justify-end\",\n      none: null,\n    },\n    vertical_position: {\n      start: \"items-start\",\n      center: \"items-center text-center\",\n      end: \"items-end\",\n      none: null,\n    },\n    borders: {\n      default: \"border rounded-md p-5\",\n      none: null,\n    },\n  },\n  defaultVariants: {\n    columns: \"default\",\n    horizontal_position: \"none\",\n    vertical_position: \"none\",\n    borders: \"none\",\n  },\n});\n\nexport type FlexWrapperProps = VariantProps<typeof flexVariants> & {\n  children: ReactNode;\n  className?: string;\n};\n\nexport function FlexWrapper({\n  children,\n  className,\n  columns,\n  horizontal_position,\n  vertical_position,\n}: FlexWrapperProps) {\n  return (\n    <div\n      id=\"flex-wrapper\"\n      className={cn(\n        // isCentered && \"place-items-stretch\",\n        flexVariants({ horizontal_position, vertical_position }),\n        \"w-full flex flex-wrap gap-4\",\n        className,\n      )}\n    >\n      {Children.map(children, (child, index) => (\n        <div\n          key={index}\n          className={cn(flexVariants({ columns }), \"flex min-h-full\")}\n        >\n          {/* <div key={index} className={cn(\"flex min-h-full\")}> */}\n          {child}\n        </div>\n      ))}\n    </div>\n  );\n}\n"
  },
  {
    "path": "apps/web/components/grid-wrapper.tsx",
    "content": "import { cn } from \"@/lib/utils\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport { ReactNode, Children } from \"react\";\n\nconst gridVariants = cva(\"w-full grid gap-4 justify-between\", {\n  variants: {\n    columns: {\n      default:\n        \"grid-cols-1 sm:grid-cols-2 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-5 2xl:grid-cols-6\",\n      \"1\": \"grid-cols-1\",\n      \"2\": \"grid-cols-1 sm:grid-cols-2\",\n      \"3\": \"grid-cols-1 sm:grid-cols-2 md:grid-cols-3\",\n      \"4\": \"grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4\",\n      \"5\": \"grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-5\",\n      \"6\": \"grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-6\",\n    },\n    horizontal_position: {\n      start: \"justify-start\",\n      center: \"justify-center text-center\",\n      end: \"justify-end\",\n    },\n    vertical_position: {\n      start: \"items-start\",\n      center: \"items-center text-center\",\n      end: \"items-end\",\n    },\n    borders: {\n      default: \"border rounded-md p-5\",\n      none: null,\n    },\n  },\n  defaultVariants: {\n    columns: \"default\",\n    horizontal_position: \"center\",\n    vertical_position: \"center\",\n    borders: \"none\",\n  },\n});\n\nexport type GridWrapperProps = VariantProps<typeof gridVariants> & {\n  children: ReactNode;\n  className?: string;\n};\n\nexport function GridWrapper({\n  children,\n  className,\n  columns,\n  horizontal_position,\n  vertical_position,\n}: GridWrapperProps) {\n  const isCentered =\n    horizontal_position === \"center\" && vertical_position === \"center\";\n\n  return (\n    <div\n      className={cn(\n        isCentered && \"place-items-stretch\",\n        gridVariants({ columns, horizontal_position, vertical_position }),\n        className,\n      )}\n    >\n      {Children.map(children, (child, index) => (\n        <div key={index} className={cn(\"flex min-h-full\")}>\n          {child}\n        </div>\n      ))}\n    </div>\n  );\n}\n"
  },
  {
    "path": "apps/web/components/icons.tsx",
    "content": "// https://lucide.dev/icons/\n// Country icons: https://www.svgrepo.com/collection/countrys-flags/\n// LinkedIn/Facebook/Twitter: https://icons8.com/icons/\n\nimport {\n  Activity,\n  ArrowRight,\n  BadgePercent,\n  BarChart,\n  Bell,\n  Building2,\n  ChevronDown,\n  ChevronsUpDown,\n  ClipboardList,\n  Copy,\n  File,\n  Gauge,\n  Globe,\n  Home,\n  LayoutTemplate,\n  Link,\n  LucideProps,\n  Menu,\n  Moon,\n  PanelLeftClose,\n  PanelLeftOpen,\n  Plus,\n  PoundSterling,\n  Settings,\n  SlidersHorizontal,\n  SunMedium,\n  User2,\n  Users,\n  Workflow,\n  X,\n} from \"lucide-react\";\n\nexport const Icons = {\n  activity: Activity,\n  analytics: BarChart,\n  arrowRight: ArrowRight,\n  badgePercent: BadgePercent,\n  building: Building2,\n  chevronDown: ChevronDown,\n  chevronUpDown: ChevronsUpDown,\n  collaboration: Users,\n  copy: Copy,\n  file: File,\n  globe: Globe,\n  home: Home,\n  link: Link,\n  menu: Menu,\n  menuClose: X,\n  moon: Moon,\n  notification: Bell,\n  panelLeftClose: PanelLeftClose,\n  panelLeftOpen: PanelLeftOpen,\n  performance: Gauge,\n  plus: Plus,\n  poundSterling: PoundSterling,\n  rules: ClipboardList,\n  settings: Settings,\n  slider: SlidersHorizontal,\n  sun: SunMedium,\n  template: LayoutTemplate,\n  user2: User2,\n  workflow: Workflow,\n  github: (props: LucideProps) => (\n    <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 98 96\" {...props}>\n      <path d=\"M48.854 0C21.839 0 0 22 0 49.217c0 21.756 13.993 40.172 33.405 46.69 2.427.49 3.316-1.059 3.316-2.362 0-1.141-.08-5.052-.08-9.127-13.59 2.934-16.42-5.867-16.42-5.867-2.184-5.704-5.42-7.17-5.42-7.17-4.448-3.015.324-3.015.324-3.015 4.934.326 7.523 5.052 7.523 5.052 4.367 7.496 11.404 5.378 14.235 4.074.404-3.178 1.699-5.378 3.074-6.6-10.839-1.141-22.243-5.378-22.243-24.283 0-5.378 1.94-9.778 5.014-13.2-.485-1.222-2.184-6.275.486-13.038 0 0 4.125-1.304 13.426 5.052a46.97 46.97 0 0 1 12.214-1.63c4.125 0 8.33.571 12.213 1.63 9.302-6.356 13.427-5.052 13.427-5.052 2.67 6.763.97 11.816.485 13.038 3.155 3.422 5.015 7.822 5.015 13.2 0 18.905-11.404 23.06-22.324 24.283 1.78 1.548 3.316 4.481 3.316 9.126 0 6.6-.08 11.897-.08 13.526 0 1.304.89 2.853 3.316 2.364 19.412-6.52 33.405-24.935 33.405-46.691C97.707 22 75.788 0 48.854 0z\" />\n    </svg>\n  ),\n  linkedin: (props: LucideProps) => (\n    <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 50 50\" {...props}>\n      <path d=\"M41,4H9C6.24,4,4,6.24,4,9v32c0,2.76,2.24,5,5,5h32c2.76,0,5-2.24,5-5V9C46,6.24,43.76,4,41,4z M17,20v19h-6V20H17z M11,14.47c0-1.4,1.2-2.47,3-2.47s2.93,1.07,3,2.47c0,1.4-1.12,2.53-3,2.53C12.2,17,11,15.87,11,14.47z M39,39h-6c0,0,0-9.26,0-10 c0-2-1-4-3.5-4.04h-0.08C27,24.96,26,27.02,26,29c0,0.91,0,10,0,10h-6V20h6v2.56c0,0,1.93-2.56,5.81-2.56 c3.97,0,7.19,2.73,7.19,8.26V39z\" />\n    </svg>\n  ),\n  doubleChevron: (props: LucideProps) => (\n    <svg\n      xmlns=\"http://www.w3.org/2000/svg\"\n      viewBox=\"0 0 24 24\"\n      {...props}\n      fill=\"none\"\n      stroke=\"currentColor\"\n      stroke-width=\"2\"\n      stroke-linecap=\"round\"\n      stroke-linejoin=\"round\"\n      className=\"text-foreground lucide lucide-chevrons-up-down\"\n    >\n      <path d=\"m7 15 5 5 5-5\" />\n      <path d=\"m7 9 5-5 5 5\" />\n    </svg>\n  ),\n  logo: (props: LucideProps) => (\n    <svg\n      id=\"Layer_1\"\n      data-name=\"Layer 1\"\n      xmlns=\"http://www.w3.org/2000/svg\"\n      viewBox=\"0 0 100 100\"\n      {...props}\n    >\n      <defs>\n        <style>\n          {`.cls-1{fill:hsl(var(--foreground));}.cls-2{fill:none}.cls-3{stroke:hsl(var(--background));}.cls-4{stroke-width:8px;}.cls-5{stroke-linecap:round;}.cls-6{stroke-linejoin:round;}`}\n        </style>\n      </defs>\n      <circle className=\"cls-1\" cx=\"50\" cy=\"50\" r=\"49.9\" />\n      <path\n        className=\"cls-2 cls-3 cls-4 cls-5 cls-6\"\n        d=\"M61.77,69.61,81.38,50,61.77,30.39\"\n      />\n      <path\n        className=\"cls-2 cls-3 cls-4 cls-5 cls-6\"\n        d=\"M38.23,69.61,18.62,50,38.23,30.39\"\n      />\n    </svg>\n  ),\n};\n"
  },
  {
    "path": "apps/web/components/layouts/dashboard/DashboardLayout.module.css",
    "content": ".dashboardWrapper {\n  grid-template-columns: min-content auto;\n  grid-template-areas: \"sidebar main\";\n  --header-height: 5rem;\n  --footer-height: 2rem;\n  --small-spacing: 1rem; /* tw class: gap-4, m-4 etc. */\n  --large-spacing: 2rem; /* tw class: gap-8, m-8 etc. */\n  --header-size: calc(var(--header-height) + var(--small-spacing));\n  --footer-size: calc(var(--footer-height) + var(--small-spacing));\n}\n\n.dashboardSidebar {\n  grid-area: sidebar;\n}\n\n.dashboardMain {\n  @apply gap-[var(--large-spacing)];\n  grid-area: main;\n  grid-template-rows: var(--header-height) calc(\n      100vh - (var(--header-height) + var(--footer-height))\n    );\n  grid-template-areas: \"header\" \"content\";\n}\n\n.dashboardHeader {\n  grid-area: header;\n}\n\n.dashboardContent {\n  grid-area: content;\n}\n\n.dashboardContentWrapper {\n  @apply gap-[var(--small-spacing)];\n  min-height: calc(\n    100vh -\n      (\n        var(--header-size) + var(--footer-size) + var(--small-spacing) +\n          var(--small-spacing)\n      )\n  );\n}\n"
  },
  {
    "path": "apps/web/components/layouts/dashboard/DashboardLayout.tsx",
    "content": "import styles from \"./DashboardLayout.module.css\";\nimport { Footer, Header, Sidebar } from \"./layout-components\";\n\ntype DashboardLayoutProps = {\n  children: React.ReactNode;\n};\n\nexport default function DashboardLayout({ children }: DashboardLayoutProps) {\n  return (\n    <div\n      className={`grid h-screen text-muted-foreground ${styles.dashboardWrapper}`}\n    >\n      <div className={`hidden h-screen sm:block ${styles.dashboardSidebar}`}>\n        <Sidebar />\n      </div>\n      <div className={`grid overflow-auto ${styles.dashboardMain}`}>\n        <div\n          className={`fixed w-screen z-50 top-0 flex h-20 items-center border-b border-border bg-background/30 px-8 backdrop-blur ${styles.dashboardHeader}`}\n        >\n          <Header />\n        </div>\n        <div className={styles.dashboardContent}>\n          <div\n            className={`flex flex-col px-8 ${styles.dashboardContentWrapper}`}\n          >\n            {children}\n          </div>\n          <div className=\"px-8\">\n            <Footer />\n          </div>\n        </div>\n      </div>\n    </div>\n  );\n}\n"
  },
  {
    "path": "apps/web/components/layouts/dashboard/index.ts",
    "content": "export { default as DashboardLayout } from \"../dashboard/DashboardLayout\";\n"
  },
  {
    "path": "apps/web/components/layouts/dashboard/layout-components/Footer/Footer.module.css",
    "content": "/* Vars here are coming from /DashboardLayout.module.css */\n.dashboardFooter {\n  @apply mt-[var(--small-spacing)] min-h-[var(--footer-height)];\n}\n"
  },
  {
    "path": "apps/web/components/layouts/dashboard/layout-components/Footer/Footer.tsx",
    "content": "import styles from \"./Footer.module.css\";\n\nconst Footer = () => {\n  return (\n    <footer className={`w-full text-sm ${styles.dashboardFooter}`}>\n      <div>\n        <div className=\"flex flex-col gap-4 justify-end\">\n          <div className=\"text-xs text-muted-foreground\">\n            Copyright© Next-Fast-Turbo. All rights reserved.\n          </div>\n        </div>\n      </div>\n    </footer>\n  );\n};\n\nexport default Footer;\n"
  },
  {
    "path": "apps/web/components/layouts/dashboard/layout-components/Footer/index.ts",
    "content": "export { default } from \"./Footer\";\n"
  },
  {
    "path": "apps/web/components/layouts/dashboard/layout-components/Header/Header.tsx",
    "content": "\"use client\";\n\nimport { usePathname } from \"next/navigation\";\nimport { navConfig } from \"@/lib/config\";\nimport { ModeToggle } from \"@/components/theme/mode-toggle\";\nimport { SidebarMobile } from \"../../layout-components\";\n\nconst Header = () => {\n  const pathName = usePathname();\n  const pageTitle = navConfig.navLinks.find((elem) => {\n    if (elem.href === pathName) {\n      return elem.pageTitle;\n    }\n  });\n\n  return (\n    <div className=\"flex h-full w-full flex-row items-center justify-between text-foreground\">\n      <div className=\"block w-full font-medium sm:block\">\n        {pageTitle?.pageTitle}\n      </div>\n      <div className=\"flex h-full w-full items-center justify-end gap-4\">\n        <div className=\"block sm:hidden\">\n          <SidebarMobile />\n        </div>\n        <div className=\"hidden sm:block\">\n          <ModeToggle />\n        </div>\n      </div>\n    </div>\n  );\n};\n\nexport default Header;\n"
  },
  {
    "path": "apps/web/components/layouts/dashboard/layout-components/Header/index.ts",
    "content": "export { default } from \"./Header\";\n"
  },
  {
    "path": "apps/web/components/layouts/dashboard/layout-components/Sidebar/NavLink.tsx",
    "content": "\"use client\";\n\nimport Link from \"next/link\";\nimport { AnimatePresence, motion } from \"framer-motion\";\n\nimport {\n  Tooltip,\n  TooltipContent,\n  TooltipProvider,\n  TooltipTrigger,\n} from \"@/components/ui/tooltip\";\n\nexport default function LinkComponent(...props: any) {\n  const activeLink = props[0].activeLink;\n  const collapsed = props[0].collapsed;\n  const animationDuration = props[0].animationDuration;\n\n  return (\n    <Link href={props[0].href}>\n      {collapsed ? (\n        <TooltipProvider delayDuration={150}>\n          <Tooltip>\n            <TooltipTrigger asChild>\n              <div\n                className={`flex flex-row gap-6 rounded-md py-3 font-normal ${\n                  collapsed ? \"justify-center\" : \"items-center\"\n                } ${activeLink ? \"bg-border text-foreground\" : \"\"}`}\n              >\n                <div className={collapsed ? \"p-0\" : \"pl-4\"}>\n                  {props[0].icon}\n                </div>\n                <AnimatePresence>\n                  <motion.div\n                    layout\n                    animate={{\n                      x: collapsed ? -20 : 0,\n                      y: collapsed ? 0 : 0,\n                      opacity: collapsed ? 0 : 1,\n                      width: collapsed ? 0 : \"auto\",\n                      display: collapsed ? \"none\" : \"block\",\n                    }}\n                    transition={{ duration: animationDuration }}\n                    className=\"text-sm\"\n                  >\n                    {props[0].label}\n                  </motion.div>\n                </AnimatePresence>\n              </div>\n            </TooltipTrigger>\n            <TooltipContent side=\"right\">\n              <p>{props[0].label}</p>\n            </TooltipContent>\n          </Tooltip>\n        </TooltipProvider>\n      ) : (\n        <div\n          className={`flex flex-row gap-6 rounded-md py-3 font-normal ${\n            collapsed ? \"justify-center\" : \"items-center\"\n          } ${activeLink ? \"bg-border text-foreground\" : \"\"}`}\n        >\n          <div className={collapsed ? \"p-0\" : \"pl-4\"}>{props[0].icon}</div>\n          <AnimatePresence>\n            <motion.div\n              layout\n              animate={{\n                x: collapsed ? -20 : 0,\n                y: collapsed ? 0 : 0,\n                opacity: collapsed ? 0 : 1,\n                width: collapsed ? 0 : \"auto\",\n                display: collapsed ? \"none\" : \"block\",\n              }}\n              transition={{ duration: animationDuration }}\n              className=\"text-sm\"\n            >\n              {props[0].label}\n            </motion.div>\n          </AnimatePresence>\n        </div>\n      )}\n    </Link>\n  );\n}\n"
  },
  {
    "path": "apps/web/components/layouts/dashboard/layout-components/Sidebar/NavLinks.tsx",
    "content": "import { FC } from \"react\";\nimport { usePathname } from \"next/navigation\";\nimport LinkComponent from \"./NavLink\";\nimport { navConfig } from \"@/lib/config/\";\n\ntype NavLinksProps = {\n  collapsed: boolean;\n  animationDuration: number;\n};\n\nconst NavLinks: FC<NavLinksProps> = ({ collapsed, animationDuration }) => {\n  const pathName = usePathname();\n\n  return (\n    <div className=\"flex h-full flex-col justify-between\">\n      <div id=\"topNavLinks\">\n        {navConfig.navLinks.map((link, index) => {\n          if (link.navLocation === \"top\") {\n            const activeLink = pathName === link.href;\n\n            return (\n              <div\n                key={index}\n                className=\"px-5 text-muted-foreground transition-all duration-300 hover:text-foreground\"\n              >\n                <LinkComponent\n                  activeLink={activeLink}\n                  href={link.href}\n                  label={link.label}\n                  icon={link.icon}\n                  animationDuration={animationDuration}\n                  collapsed={collapsed}\n                />\n              </div>\n            );\n          }\n        })}\n      </div>\n\n      <div id=\"btmNavLinks\">\n        {navConfig.navLinks.map((link, index) => {\n          if (link.navLocation === \"bottom\") {\n            const activeLink = pathName === link.href;\n\n            return (\n              <div\n                key={index}\n                className=\"px-5 text-muted-foreground transition-all duration-300 hover:text-foreground\"\n              >\n                <LinkComponent\n                  activeLink={activeLink}\n                  href={link.href}\n                  label={link.label}\n                  icon={link.icon}\n                  animationDuration={animationDuration}\n                  collapsed={collapsed}\n                />\n              </div>\n            );\n          }\n        })}\n      </div>\n    </div>\n  );\n};\n\nexport default NavLinks;\n"
  },
  {
    "path": "apps/web/components/layouts/dashboard/layout-components/Sidebar/Sidebar.tsx",
    "content": "\"use client\";\nimport { useEffect } from \"react\";\nimport { useState } from \"react\";\nimport Link from \"next/link\";\nimport { Icons } from \"@/components/icons\";\nimport { motion } from \"framer-motion\";\nimport NavLinks from \"./NavLinks\";\n\nconst Sidebar = () => {\n  const [collapsed, setCollapsed] = useState(false);\n  const animationDuration = 0.4;\n  const sideBarWidth = \"250px\";\n\n  // Load collapsed state from localStorage on component mount\n  useEffect(() => {\n    const collapsedState = localStorage.getItem(\"sidebarCollapsed\");\n    if (collapsedState !== null) {\n      setCollapsed(collapsedState === \"true\" ? true : false);\n    }\n  }, []);\n\n  const handleClose = () => {\n    localStorage.setItem(\"sidebarCollapsed\", (!collapsed).toString());\n    setCollapsed(!collapsed);\n  };\n\n  return (\n    <motion.div\n      layout\n      initial={{ width: collapsed ? \"88px\" : sideBarWidth }}\n      animate={{\n        minWidth: collapsed ? \"88px\" : sideBarWidth,\n        width: collapsed ? \"88px\" : sideBarWidth,\n      }}\n      transition={{ duration: animationDuration }}\n      id=\"sidebar\"\n      className={`flex h-full flex-col justify-between gap-8 border-r border-border`}\n    >\n      <div\n        className={`flex h-20 items-center justify-between border-b border-border ${\n          collapsed ? \"px-8\" : \"px-4\"\n        } `}\n      >\n        <Link href=\"/\">\n          <motion.div\n            layout\n            animate={{\n              x: collapsed ? -100 : 0,\n              y: collapsed ? 0 : 0,\n              opacity: collapsed ? 0 : 1,\n              width: collapsed ? 0 : \"auto\",\n              display: collapsed ? \"none\" : \"block\",\n            }}\n            transition={{ duration: animationDuration }}\n          >\n            <div className=\"flex flex-row items-center gap-1 font-semibold text-sm text-foreground\">\n              <span>\n                <Icons.logo className=\"h-5\" />\n              </span>\n              Next-Fast-Turbo\n            </div>\n          </motion.div>\n        </Link>\n\n        {collapsed ? (\n          <Icons.panelLeftOpen\n            className=\"h-6 w-6 cursor-pointer text-muted-foreground transition-all hover:text-foreground hover:duration-300\"\n            onClick={handleClose}\n          />\n        ) : (\n          <Icons.panelLeftClose\n            className=\"h-6 w-6 cursor-pointer text-muted-foreground transition-all hover:text-foreground hover:duration-300\"\n            onClick={handleClose}\n          />\n        )}\n      </div>\n      <div className=\"flex-1 border-border pb-8\">\n        <NavLinks collapsed={collapsed} animationDuration={animationDuration} />\n      </div>\n    </motion.div>\n  );\n};\n\nexport default Sidebar;\n"
  },
  {
    "path": "apps/web/components/layouts/dashboard/layout-components/Sidebar/SidebarMobile.tsx",
    "content": "\"use client\";\nimport { useRef } from \"react\";\nimport { useState } from \"react\";\nimport { Squash as Hamburger } from \"hamburger-react\";\nimport { useClickAway } from \"react-use\";\nimport { navConfig } from \"@/lib/config/\";\n\nimport { AnimatePresence, motion } from \"framer-motion\";\nimport Link from \"next/link\";\nimport { Separator } from \"@/components/ui/separator\";\n\nconst SidebarMobile = () => {\n  const [isOpen, setOpen] = useState(false);\n  const ref = useRef(null);\n\n  useClickAway(ref, () => setOpen(false));\n\n  return (\n    <div ref={ref}>\n      <Hamburger toggled={isOpen} size={20} toggle={setOpen} />\n      <AnimatePresence>\n        {isOpen && (\n          <motion.div\n            initial={{ opacity: 0 }}\n            animate={{ opacity: 1 }}\n            exit={{ opacity: 0 }}\n            transition={{ duration: 0.2 }}\n            className=\"fixed left-0 w-[85%] py-12 h-screen px-8 bg-background\"\n          >\n            <ul className=\"grid min-h-72 content-evenly\">\n              {navConfig.navLinks.map((link, index) => {\n                return (\n                  <motion.li\n                    initial={{ scale: 0, opacity: 0 }}\n                    animate={{ scale: 1, opacity: 1 }}\n                    transition={{\n                      type: \"spring\",\n                      stiffness: 260,\n                      damping: 20,\n                      delay: 0.1 + index / 10,\n                    }}\n                    key={link.pageTitle}\n                    className=\"w-full\"\n                  >\n                    <Link href={link.href}>{link.pageTitle}</Link>\n                    <Separator className=\"my-2\" />\n                  </motion.li>\n                );\n              })}\n            </ul>\n          </motion.div>\n        )}\n      </AnimatePresence>\n    </div>\n  );\n};\n\nexport default SidebarMobile;\n"
  },
  {
    "path": "apps/web/components/layouts/dashboard/layout-components/Sidebar/index.ts",
    "content": "export { default as Sidebar } from \"./Sidebar\";\nexport { default as SidebarMobile } from \"./SidebarMobile\";\n"
  },
  {
    "path": "apps/web/components/layouts/dashboard/layout-components/index.ts",
    "content": "export { Sidebar } from \"./Sidebar\";\nexport { SidebarMobile } from \"./Sidebar\";\nexport { default as Header } from \"./Header\";\nexport { default as Footer } from \"./Footer\";\n"
  },
  {
    "path": "apps/web/components/search-users.tsx",
    "content": "\"use client\";\nimport * as React from \"react\";\nimport { zodResolver } from \"@hookform/resolvers/zod\";\nimport { useForm } from \"react-hook-form\";\nimport { z } from \"zod\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n  Form,\n  FormControl,\n  FormDescription,\n  FormField,\n  FormItem,\n  FormLabel,\n  FormMessage,\n} from \"@/components/ui/form\";\nimport { RadioGroup, RadioGroupItem } from \"@/components/ui/radio-group\";\nimport {\n  Card,\n  CardContent,\n  CardDescription,\n  CardFooter,\n  CardHeader,\n  CardTitle,\n} from \"@/components/ui/card\";\nimport { Skeleton } from \"./ui/skeleton\";\nimport { Input } from \"@/components/ui/input\";\nimport { UsersService, UserSearchResults } from \"@/lib/api/client\";\n\nconst searchOnFields = [\"id\", \"email\", \"forename\", \"surname\"];\n\nconst FormSchema = z.object({\n  keyword: z.string().optional(),\n  searchOn: z.enum([\"id\", \"email\", \"forename\", \"surname\"]).optional(),\n  searchResults: z\n    .string()\n    .min(1, {\n      message: \"Must return at least 1 result\",\n    })\n    .optional(),\n});\n\nexport default function SearchUsers() {\n  const [searchResults, setSearchResults] = React.useState<UserSearchResults>({\n    results: [],\n  });\n  const [error, setError] = React.useState(null);\n  const [loading, setLoading] = React.useState(false);\n\n  const form = useForm<z.infer<typeof FormSchema>>({\n    resolver: zodResolver(FormSchema),\n    defaultValues: {\n      keyword: \".com\",\n      searchOn: \"email\",\n      searchResults: \"10\",\n    },\n  });\n\n  const onSubmit = async (data: z.infer<typeof FormSchema>) => {\n    console.log(data);\n    try {\n      setLoading(true); // set loading state\n      setError(null); // clear error state if it exists\n      const maxResults = data.searchResults ? parseInt(data.searchResults) : 10;\n      const response = await UsersService.usersSearchUsers({\n        keyword: data.keyword,\n        searchOn: data.searchOn,\n        maxResults: maxResults,\n      });\n      setLoading(false);\n      console.log(response);\n      setSearchResults(response);\n      setError(null);\n    } catch (error) {\n      console.log(\"Error received\", error);\n      setLoading(false);\n      setSearchResults({ results: [] });\n      setError(error);\n    }\n  };\n\n  return (\n    <div className=\"flex flex-col gap-4\">\n      <Form {...form}>\n        <Card>\n          <form onSubmit={form.handleSubmit(onSubmit)}>\n            <CardHeader>\n              <CardTitle>FastAPI data</CardTitle>\n              <CardDescription>\n                Data coming from FastAPI backend\n              </CardDescription>\n            </CardHeader>\n\n            <CardContent>\n              <div className=\"flex flex-col md:flex-row gap-8 w-full\">\n                <FormField\n                  control={form.control}\n                  name=\"keyword\"\n                  render={({ field }) => (\n                    <FormItem className=\"w-full md:w-1/3\">\n                      <FormLabel>Keyword</FormLabel>\n                      <FormControl>\n                        <Input\n                          className=\"text-foreground bg-none w-full\"\n                          placeholder=\"shadcn\"\n                          {...field}\n                        />\n                      </FormControl>\n                      <FormDescription>The keyword to search.</FormDescription>\n                      <FormMessage />\n                    </FormItem>\n                  )}\n                />\n                <FormField\n                  control={form.control}\n                  name=\"searchResults\"\n                  render={({ field }) => (\n                    <FormItem className=\"w-full md:w-1/3\">\n                      <FormLabel>Max results</FormLabel>\n                      <FormControl>\n                        <Input\n                          className=\"text-foreground bg-none w-full\"\n                          min={1}\n                          type=\"number\"\n                          {...field}\n                        />\n                      </FormControl>\n                      <FormDescription>\n                        Set maximum number of results to return.\n                      </FormDescription>\n                      <FormMessage />\n                    </FormItem>\n                  )}\n                />\n                <FormField\n                  control={form.control}\n                  name=\"searchOn\"\n                  render={({ field }) => (\n                    <FormItem className=\"w-full md:w-1/3\">\n                      <FormLabel>Search field</FormLabel>\n                      <FormControl>\n                        <RadioGroup\n                          defaultValue=\"email\"\n                          onValueChange={field.onChange}\n                          className=\"grid grid-cols-2 gap-x-8 w-full text-foreground\"\n                        >\n                          {searchOnFields.map((item) => (\n                            <FormItem\n                              key={item}\n                              className=\"flex space-x-1 space-y-0 \"\n                            >\n                              <FormControl>\n                                <RadioGroupItem value={item} />\n                              </FormControl>\n                              <FormLabel className=\"font-normal\">\n                                {item.charAt(0).toUpperCase() + item.slice(1)}\n                              </FormLabel>\n                            </FormItem>\n                          ))}\n                        </RadioGroup>\n                      </FormControl>\n                      <FormDescription>The field to search on.</FormDescription>\n                    </FormItem>\n                  )}\n                />\n              </div>\n            </CardContent>\n            <CardFooter>\n              <div className=\"flex flex-row gap-4 w-full my-4\">\n                <Button className=\"min-w-24\" type=\"submit\">\n                  Submit\n                </Button>\n                <Button\n                  className=\"min-w-24\"\n                  type=\"button\"\n                  variant=\"secondary\"\n                  onClick={() => {\n                    form.reset();\n                    setError(null); // clear error state\n                  }}\n                >\n                  Reset form\n                </Button>\n              </div>\n            </CardFooter>\n          </form>\n        </Card>\n      </Form>\n\n      {loading ? (\n        <Skeleton className=\"bg-foreground/10 text-foreground p-5 rounded-lg\" />\n      ) : null}\n\n      {searchResults.results.length >= 1 ? (\n        // Render the results if searchResults is set\n        <div className=\"bg-foreground/10 text-foreground p-5 rounded-lg max-h-80 overflow-y-auto\">\n          {/* Replace this with your code to render the results */}\n          <pre>{JSON.stringify(searchResults, null, 2)}</pre>\n        </div>\n      ) : null}\n\n      {/* This can be handled better to understand what type of error is occurring rather than just a blanket handler */}\n      {error ? (\n        <div>\n          Couldn't find any results that match your criteria. Please try again.\n        </div>\n      ) : null}\n    </div>\n  );\n}\n"
  },
  {
    "path": "apps/web/components/tailwind-indicator.tsx",
    "content": "// https://github.com/shadcn-ui/taxonomy/blob/main/components/tailwind-indicator.tsx#L1\n\nexport function TailwindIndicator() {\n  if (process.env.NODE_ENV === \"production\") return null;\n\n  return (\n    <div className=\"fixed bottom-5 left-5 z-50 flex h-6 w-6 items-center justify-center rounded-full bg-red-800 p-4 font-mono text-sm font-semibold border border-white text-white\">\n      <div className=\"block sm:hidden\">xs</div>\n      <div className=\"hidden sm:block md:hidden lg:hidden xl:hidden 2xl:hidden\">\n        sm\n      </div>\n      <div className=\"hidden md:block lg:hidden xl:hidden 2xl:hidden\">md</div>\n      <div className=\"hidden lg:block xl:hidden 2xl:hidden\">lg</div>\n      <div className=\"hidden xl:block 2xl:hidden\">xl</div>\n      <div className=\"hidden 2xl:block\">2xl</div>\n    </div>\n  );\n}\n"
  },
  {
    "path": "apps/web/components/theme/mode-toggle.tsx",
    "content": "\"use client\";\n\nimport * as React from \"react\";\nimport { MoonIcon, SunIcon } from \"@radix-ui/react-icons\";\nimport { useTheme } from \"next-themes\";\n\nimport { Button } from \"@/components/ui/button\";\n\nexport function ModeToggle() {\n  const { setTheme, resolvedTheme } = useTheme();\n\n  const handleSubmit = () => {\n    setTheme(resolvedTheme === \"dark\" ? \"light\" : \"dark\");\n  };\n\n  return (\n    <>\n      <Button onClick={handleSubmit} variant=\"outline\" size=\"icon\">\n        <SunIcon className=\"h-[1.2rem] w-[1.2rem] rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0\" />\n        <MoonIcon className=\"absolute h-[1.2rem] w-[1.2rem] rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100\" />\n        <span className=\"sr-only\">Toggle theme</span>\n      </Button>\n    </>\n  );\n}\n"
  },
  {
    "path": "apps/web/components/theme/theme-provider.tsx",
    "content": "\"use client\";\n\nimport * as React from \"react\";\nimport { ThemeProvider as NextThemesProvider } from \"next-themes\";\nimport { type ThemeProviderProps } from \"next-themes/dist/types\";\n\nexport function ThemeProvider({ children, ...props }: ThemeProviderProps) {\n  return <NextThemesProvider {...props}>{children}</NextThemesProvider>;\n}\n"
  },
  {
    "path": "apps/web/components/theme/theme.css",
    "content": "@tailwind base;\n\n@layer base {\n  :root {\n    --background: 0 0% 100%;\n    --foreground: 224 71.4% 4.1%;\n    --card: 0 0% 100%;\n    --card-foreground: 224 71.4% 4.1%;\n    --popover: 0 0% 100%;\n    --popover-foreground: 224 71.4% 4.1%;\n    --primary: 262.1 83.3% 57.8%;\n    --primary-foreground: 210 20% 98%;\n    --secondary: 220 14.3% 95.9%;\n    --secondary-foreground: 220.9 39.3% 11%;\n    --muted: 220 14.3% 95.9%;\n    --muted-foreground: 220 8.9% 46.1%;\n    --accent: 220 14.3% 95.9%;\n    --accent-foreground: 220.9 39.3% 11%;\n    --destructive: 0 84.2% 60.2%;\n    --destructive-foreground: 210 20% 98%;\n    --border: 220 13% 91%;\n    --input: 220 13% 91%;\n    --ring: 262.1 83.3% 57.8%;\n    --radius: 0.5rem;\n  }\n\n  .dark {\n    --background: 224 71.4% 4.1%;\n    --foreground: 210 20% 98%;\n    --card: 224 71.4% 4.1%;\n    --card-foreground: 210 20% 98%;\n    --popover: 224 71.4% 4.1%;\n    --popover-foreground: 210 20% 98%;\n    --primary: 263.4 70% 50.4%;\n    --primary-foreground: 210 20% 98%;\n    --secondary: 215 27.9% 16.9%;\n    --secondary-foreground: 210 20% 98%;\n    --muted: 215 27.9% 16.9%;\n    --muted-foreground: 217.9 10.6% 64.9%;\n    --accent: 215 27.9% 16.9%;\n    --accent-foreground: 210 20% 98%;\n    --destructive: 0 62.8% 30.6%;\n    --destructive-foreground: 210 20% 98%;\n    --border: 215 27.9% 16.9%;\n    --input: 215 27.9% 16.9%;\n    --ring: 263.4 70% 50.4%;\n  }\n}\n"
  },
  {
    "path": "apps/web/components/typography.tsx",
    "content": "// WIP component. Will flesh out more as we develop\n\nimport * as React from \"react\";\nimport { cn } from \"@/lib/utils\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\n\nconst typographyVariants = cva(\"m-0 self-center p-0\", {\n  variants: {\n    variant: {\n      h1: \"scroll-m-20 text-4xl font-extrabold tracking-tight lg:text-5xl\",\n      h2: \"scroll-m-20 border-b pb-2 text-3xl font-semibold tracking-tight first:mt-0\",\n      h3: \"scroll-m-20 text-2xl font-semibold tracking-tight\",\n      h4: \"scroll-m-20 text-xl font-semibold tracking-tight\",\n      p: \"leading-7 [&:not(:first-child)]:mt-6\",\n      code: \"relative rounded bg-muted px-[0.3rem] py-[0.2rem] font-mono text-sm font-semibold\",\n      lead: \"text-xl text-muted-foreground\",\n    },\n    size: {\n      default: \"text-lg\",\n      sm: \"text-sm\",\n      lg: \"text-xl\",\n    },\n    colour: {\n      default: \"text-foreground\",\n      muted: \"text-muted-foreground\",\n      accent: \"text-accent\",\n      inverted: \"text-background\",\n    },\n  },\n  defaultVariants: {\n    variant: \"p\",\n    size: \"default\",\n    colour: \"default\",\n  },\n});\n\nexport interface TypographyProps\n  extends React.HTMLAttributes<HTMLHeadingElement>,\n    VariantProps<typeof typographyVariants> {\n  children: React.ReactNode;\n}\n\nconst Typography = ({\n  variant,\n  size,\n  colour,\n  className,\n  children,\n}: TypographyProps) => {\n  let HeadingComponent: React.ElementType = \"div\";\n\n  switch (variant) {\n    case \"h1\":\n      HeadingComponent = \"h1\";\n      break;\n    case \"h2\":\n      HeadingComponent = \"h2\";\n      break;\n    case \"h3\":\n      HeadingComponent = \"h3\";\n      break;\n    case \"h4\":\n      HeadingComponent = \"h4\";\n      break;\n    case \"p\":\n      HeadingComponent = \"p\";\n      break;\n    case \"code\":\n      HeadingComponent = \"code\";\n      break;\n  }\n\n  return (\n    <HeadingComponent\n      className={cn(typographyVariants({ variant, size, className, colour }))}\n    >\n      {children}\n    </HeadingComponent>\n  );\n};\n\nexport { Typography, typographyVariants as buttonVariants };\n"
  },
  {
    "path": "apps/web/components/ui/button.tsx",
    "content": "import * as React from \"react\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\n\nimport { cn } from \"@/lib/utils\";\n\nconst buttonVariants = cva(\n  \"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50\",\n  {\n    variants: {\n      variant: {\n        default: \"bg-primary text-primary-foreground hover:bg-primary/90\",\n        destructive:\n          \"bg-destructive text-destructive-foreground hover:bg-destructive/90\",\n        outline:\n          \"border border-input bg-background hover:bg-accent hover:text-accent-foreground\",\n        secondary:\n          \"bg-secondary text-secondary-foreground hover:bg-secondary/80\",\n        ghost: \"hover:bg-accent hover:text-accent-foreground\",\n        link: \"text-primary underline-offset-4 hover:underline\",\n      },\n      size: {\n        default: \"h-10 px-4 py-2\",\n        sm: \"h-9 rounded-md px-3\",\n        lg: \"h-11 rounded-md px-8\",\n        icon: \"h-10 w-10\",\n      },\n    },\n    defaultVariants: {\n      variant: \"default\",\n      size: \"default\",\n    },\n  },\n);\n\nexport interface ButtonProps\n  extends React.ButtonHTMLAttributes<HTMLButtonElement>,\n    VariantProps<typeof buttonVariants> {\n  asChild?: boolean;\n}\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n  ({ className, variant, size, asChild = false, ...props }, ref) => {\n    const Comp = asChild ? Slot : \"button\";\n    return (\n      <Comp\n        className={cn(buttonVariants({ variant, size, className }))}\n        ref={ref}\n        {...props}\n      />\n    );\n  },\n);\nButton.displayName = \"Button\";\n\nexport { Button, buttonVariants };\n"
  },
  {
    "path": "apps/web/components/ui/card.tsx",
    "content": "import * as React from \"react\";\n\nimport { cn } from \"@/lib/utils\";\n\nconst Card = React.forwardRef<\n  HTMLDivElement,\n  React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n  <div\n    ref={ref}\n    className={cn(\n      \"rounded-lg border bg-card text-card-foreground shadow-sm\",\n      className,\n    )}\n    {...props}\n  />\n));\nCard.displayName = \"Card\";\n\nconst CardHeader = React.forwardRef<\n  HTMLDivElement,\n  React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n  <div\n    ref={ref}\n    className={cn(\"flex flex-col space-y-1.5 p-6\", className)}\n    {...props}\n  />\n));\nCardHeader.displayName = \"CardHeader\";\n\nconst CardTitle = React.forwardRef<\n  HTMLParagraphElement,\n  React.HTMLAttributes<HTMLHeadingElement>\n>(({ className, ...props }, ref) => (\n  <h3\n    ref={ref}\n    className={cn(\n      \"text-2xl font-semibold leading-none tracking-tight\",\n      className,\n    )}\n    {...props}\n  />\n));\nCardTitle.displayName = \"CardTitle\";\n\nconst CardDescription = React.forwardRef<\n  HTMLParagraphElement,\n  React.HTMLAttributes<HTMLParagraphElement>\n>(({ className, ...props }, ref) => (\n  <p\n    ref={ref}\n    className={cn(\"text-sm text-muted-foreground\", className)}\n    {...props}\n  />\n));\nCardDescription.displayName = \"CardDescription\";\n\nconst CardContent = React.forwardRef<\n  HTMLDivElement,\n  React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n  <div ref={ref} className={cn(\"p-6 pt-0\", className)} {...props} />\n));\nCardContent.displayName = \"CardContent\";\n\nconst CardFooter = React.forwardRef<\n  HTMLDivElement,\n  React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n  <div\n    ref={ref}\n    className={cn(\"flex items-center p-6 pt-0\", className)}\n    {...props}\n  />\n));\nCardFooter.displayName = \"CardFooter\";\n\nexport {\n  Card,\n  CardHeader,\n  CardFooter,\n  CardTitle,\n  CardDescription,\n  CardContent,\n};\n"
  },
  {
    "path": "apps/web/components/ui/dropdown-menu.tsx",
    "content": "\"use client\";\n\nimport * as React from \"react\";\nimport * as DropdownMenuPrimitive from \"@radix-ui/react-dropdown-menu\";\nimport { Check, ChevronRight, Circle } from \"lucide-react\";\n\nimport { cn } from \"@/lib/utils\";\n\nconst DropdownMenu = DropdownMenuPrimitive.Root;\n\nconst DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;\n\nconst DropdownMenuGroup = DropdownMenuPrimitive.Group;\n\nconst DropdownMenuPortal = DropdownMenuPrimitive.Portal;\n\nconst DropdownMenuSub = DropdownMenuPrimitive.Sub;\n\nconst DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;\n\nconst DropdownMenuSubTrigger = React.forwardRef<\n  React.ElementRef<typeof DropdownMenuPrimitive.SubTrigger>,\n  React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubTrigger> & {\n    inset?: boolean;\n  }\n>(({ className, inset, children, ...props }, ref) => (\n  <DropdownMenuPrimitive.SubTrigger\n    ref={ref}\n    className={cn(\n      \"flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent\",\n      inset && \"pl-8\",\n      className,\n    )}\n    {...props}\n  >\n    {children}\n    <ChevronRight className=\"ml-auto h-4 w-4\" />\n  </DropdownMenuPrimitive.SubTrigger>\n));\nDropdownMenuSubTrigger.displayName =\n  DropdownMenuPrimitive.SubTrigger.displayName;\n\nconst DropdownMenuSubContent = React.forwardRef<\n  React.ElementRef<typeof DropdownMenuPrimitive.SubContent>,\n  React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubContent>\n>(({ className, ...props }, ref) => (\n  <DropdownMenuPrimitive.SubContent\n    ref={ref}\n    className={cn(\n      \"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\",\n      className,\n    )}\n    {...props}\n  />\n));\nDropdownMenuSubContent.displayName =\n  DropdownMenuPrimitive.SubContent.displayName;\n\nconst DropdownMenuContent = React.forwardRef<\n  React.ElementRef<typeof DropdownMenuPrimitive.Content>,\n  React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content>\n>(({ className, sideOffset = 4, ...props }, ref) => (\n  <DropdownMenuPrimitive.Portal>\n    <DropdownMenuPrimitive.Content\n      ref={ref}\n      sideOffset={sideOffset}\n      className={cn(\n        \"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\",\n        className,\n      )}\n      {...props}\n    />\n  </DropdownMenuPrimitive.Portal>\n));\nDropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;\n\nconst DropdownMenuItem = React.forwardRef<\n  React.ElementRef<typeof DropdownMenuPrimitive.Item>,\n  React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> & {\n    inset?: boolean;\n  }\n>(({ className, inset, ...props }, ref) => (\n  <DropdownMenuPrimitive.Item\n    ref={ref}\n    className={cn(\n      \"relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n      inset && \"pl-8\",\n      className,\n    )}\n    {...props}\n  />\n));\nDropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;\n\nconst DropdownMenuCheckboxItem = React.forwardRef<\n  React.ElementRef<typeof DropdownMenuPrimitive.CheckboxItem>,\n  React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.CheckboxItem>\n>(({ className, children, checked, ...props }, ref) => (\n  <DropdownMenuPrimitive.CheckboxItem\n    ref={ref}\n    className={cn(\n      \"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n      className,\n    )}\n    checked={checked}\n    {...props}\n  >\n    <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n      <DropdownMenuPrimitive.ItemIndicator>\n        <Check className=\"h-4 w-4\" />\n      </DropdownMenuPrimitive.ItemIndicator>\n    </span>\n    {children}\n  </DropdownMenuPrimitive.CheckboxItem>\n));\nDropdownMenuCheckboxItem.displayName =\n  DropdownMenuPrimitive.CheckboxItem.displayName;\n\nconst DropdownMenuRadioItem = React.forwardRef<\n  React.ElementRef<typeof DropdownMenuPrimitive.RadioItem>,\n  React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioItem>\n>(({ className, children, ...props }, ref) => (\n  <DropdownMenuPrimitive.RadioItem\n    ref={ref}\n    className={cn(\n      \"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n      className,\n    )}\n    {...props}\n  >\n    <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n      <DropdownMenuPrimitive.ItemIndicator>\n        <Circle className=\"h-2 w-2 fill-current\" />\n      </DropdownMenuPrimitive.ItemIndicator>\n    </span>\n    {children}\n  </DropdownMenuPrimitive.RadioItem>\n));\nDropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;\n\nconst DropdownMenuLabel = React.forwardRef<\n  React.ElementRef<typeof DropdownMenuPrimitive.Label>,\n  React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label> & {\n    inset?: boolean;\n  }\n>(({ className, inset, ...props }, ref) => (\n  <DropdownMenuPrimitive.Label\n    ref={ref}\n    className={cn(\n      \"px-2 py-1.5 text-sm font-semibold\",\n      inset && \"pl-8\",\n      className,\n    )}\n    {...props}\n  />\n));\nDropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;\n\nconst DropdownMenuSeparator = React.forwardRef<\n  React.ElementRef<typeof DropdownMenuPrimitive.Separator>,\n  React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n  <DropdownMenuPrimitive.Separator\n    ref={ref}\n    className={cn(\"-mx-1 my-1 h-px bg-muted\", className)}\n    {...props}\n  />\n));\nDropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;\n\nconst DropdownMenuShortcut = ({\n  className,\n  ...props\n}: React.HTMLAttributes<HTMLSpanElement>) => {\n  return (\n    <span\n      className={cn(\"ml-auto text-xs tracking-widest opacity-60\", className)}\n      {...props}\n    />\n  );\n};\nDropdownMenuShortcut.displayName = \"DropdownMenuShortcut\";\n\nexport {\n  DropdownMenu,\n  DropdownMenuTrigger,\n  DropdownMenuContent,\n  DropdownMenuItem,\n  DropdownMenuCheckboxItem,\n  DropdownMenuRadioItem,\n  DropdownMenuLabel,\n  DropdownMenuSeparator,\n  DropdownMenuShortcut,\n  DropdownMenuGroup,\n  DropdownMenuPortal,\n  DropdownMenuSub,\n  DropdownMenuSubContent,\n  DropdownMenuSubTrigger,\n  DropdownMenuRadioGroup,\n};\n"
  },
  {
    "path": "apps/web/components/ui/form.tsx",
    "content": "import * as React from \"react\";\nimport * as LabelPrimitive from \"@radix-ui/react-label\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport {\n  Controller,\n  ControllerProps,\n  FieldPath,\n  FieldValues,\n  FormProvider,\n  useFormContext,\n} from \"react-hook-form\";\n\nimport { cn } from \"@/lib/utils\";\nimport { Label } from \"@/components/ui/label\";\n\nconst Form = FormProvider;\n\ntype FormFieldContextValue<\n  TFieldValues extends FieldValues = FieldValues,\n  TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n> = {\n  name: TName;\n};\n\nconst FormFieldContext = React.createContext<FormFieldContextValue>(\n  {} as FormFieldContextValue,\n);\n\nconst FormField = <\n  TFieldValues extends FieldValues = FieldValues,\n  TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n>({\n  ...props\n}: ControllerProps<TFieldValues, TName>) => {\n  return (\n    <FormFieldContext.Provider value={{ name: props.name }}>\n      <Controller {...props} />\n    </FormFieldContext.Provider>\n  );\n};\n\nconst useFormField = () => {\n  const fieldContext = React.useContext(FormFieldContext);\n  const itemContext = React.useContext(FormItemContext);\n  const { getFieldState, formState } = useFormContext();\n\n  const fieldState = getFieldState(fieldContext.name, formState);\n\n  if (!fieldContext) {\n    throw new Error(\"useFormField should be used within <FormField>\");\n  }\n\n  const { id } = itemContext;\n\n  return {\n    id,\n    name: fieldContext.name,\n    formItemId: `${id}-form-item`,\n    formDescriptionId: `${id}-form-item-description`,\n    formMessageId: `${id}-form-item-message`,\n    ...fieldState,\n  };\n};\n\ntype FormItemContextValue = {\n  id: string;\n};\n\nconst FormItemContext = React.createContext<FormItemContextValue>(\n  {} as FormItemContextValue,\n);\n\nconst FormItem = React.forwardRef<\n  HTMLDivElement,\n  React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => {\n  const id = React.useId();\n\n  return (\n    <FormItemContext.Provider value={{ id }}>\n      <div ref={ref} className={cn(\"space-y-2\", className)} {...props} />\n    </FormItemContext.Provider>\n  );\n});\nFormItem.displayName = \"FormItem\";\n\nconst FormLabel = React.forwardRef<\n  React.ElementRef<typeof LabelPrimitive.Root>,\n  React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root>\n>(({ className, ...props }, ref) => {\n  const { error, formItemId } = useFormField();\n\n  return (\n    <Label\n      ref={ref}\n      className={cn(error && \"text-destructive\", className)}\n      htmlFor={formItemId}\n      {...props}\n    />\n  );\n});\nFormLabel.displayName = \"FormLabel\";\n\nconst FormControl = React.forwardRef<\n  React.ElementRef<typeof Slot>,\n  React.ComponentPropsWithoutRef<typeof Slot>\n>(({ ...props }, ref) => {\n  const { error, formItemId, formDescriptionId, formMessageId } =\n    useFormField();\n\n  return (\n    <Slot\n      ref={ref}\n      id={formItemId}\n      aria-describedby={\n        !error\n          ? `${formDescriptionId}`\n          : `${formDescriptionId} ${formMessageId}`\n      }\n      aria-invalid={!!error}\n      {...props}\n    />\n  );\n});\nFormControl.displayName = \"FormControl\";\n\nconst FormDescription = React.forwardRef<\n  HTMLParagraphElement,\n  React.HTMLAttributes<HTMLParagraphElement>\n>(({ className, ...props }, ref) => {\n  const { formDescriptionId } = useFormField();\n\n  return (\n    <p\n      ref={ref}\n      id={formDescriptionId}\n      className={cn(\"text-sm text-muted-foreground\", className)}\n      {...props}\n    />\n  );\n});\nFormDescription.displayName = \"FormDescription\";\n\nconst FormMessage = React.forwardRef<\n  HTMLParagraphElement,\n  React.HTMLAttributes<HTMLParagraphElement>\n>(({ className, children, ...props }, ref) => {\n  const { error, formMessageId } = useFormField();\n  const body = error ? String(error?.message) : children;\n\n  if (!body) {\n    return null;\n  }\n\n  return (\n    <p\n      ref={ref}\n      id={formMessageId}\n      className={cn(\"text-sm font-medium text-destructive\", className)}\n      {...props}\n    >\n      {body}\n    </p>\n  );\n});\nFormMessage.displayName = \"FormMessage\";\n\nexport {\n  useFormField,\n  Form,\n  FormItem,\n  FormLabel,\n  FormControl,\n  FormDescription,\n  FormMessage,\n  FormField,\n};\n"
  },
  {
    "path": "apps/web/components/ui/input.tsx",
    "content": "import * as React from \"react\";\n\nimport { cn } from \"@/lib/utils\";\n\nexport interface InputProps\n  extends React.InputHTMLAttributes<HTMLInputElement> {}\n\nconst Input = React.forwardRef<HTMLInputElement, InputProps>(\n  ({ className, type, ...props }, ref) => {\n    return (\n      <input\n        type={type}\n        className={cn(\n          \"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50\",\n          className,\n        )}\n        ref={ref}\n        {...props}\n      />\n    );\n  },\n);\nInput.displayName = \"Input\";\n\nexport { Input };\n"
  },
  {
    "path": "apps/web/components/ui/label.tsx",
    "content": "\"use client\";\n\nimport * as React from \"react\";\nimport * as LabelPrimitive from \"@radix-ui/react-label\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\n\nimport { cn } from \"@/lib/utils\";\n\nconst labelVariants = cva(\n  \"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70\",\n);\n\nconst Label = React.forwardRef<\n  React.ElementRef<typeof LabelPrimitive.Root>,\n  React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root> &\n    VariantProps<typeof labelVariants>\n>(({ className, ...props }, ref) => (\n  <LabelPrimitive.Root\n    ref={ref}\n    className={cn(labelVariants(), className)}\n    {...props}\n  />\n));\nLabel.displayName = LabelPrimitive.Root.displayName;\n\nexport { Label };\n"
  },
  {
    "path": "apps/web/components/ui/radio-group.tsx",
    "content": "\"use client\";\n\nimport * as React from \"react\";\nimport * as RadioGroupPrimitive from \"@radix-ui/react-radio-group\";\nimport { Circle } from \"lucide-react\";\n\nimport { cn } from \"@/lib/utils\";\n\nconst RadioGroup = React.forwardRef<\n  React.ElementRef<typeof RadioGroupPrimitive.Root>,\n  React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Root>\n>(({ className, ...props }, ref) => {\n  return (\n    <RadioGroupPrimitive.Root\n      className={cn(\"grid gap-2\", className)}\n      {...props}\n      ref={ref}\n    />\n  );\n});\nRadioGroup.displayName = RadioGroupPrimitive.Root.displayName;\n\nconst RadioGroupItem = React.forwardRef<\n  React.ElementRef<typeof RadioGroupPrimitive.Item>,\n  React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item>\n>(({ className, ...props }, ref) => {\n  return (\n    <RadioGroupPrimitive.Item\n      ref={ref}\n      className={cn(\n        \"aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50\",\n        className,\n      )}\n      {...props}\n    >\n      <RadioGroupPrimitive.Indicator className=\"flex items-center justify-center\">\n        <Circle className=\"h-2.5 w-2.5 fill-current text-current\" />\n      </RadioGroupPrimitive.Indicator>\n    </RadioGroupPrimitive.Item>\n  );\n});\nRadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName;\n\nexport { RadioGroup, RadioGroupItem };\n"
  },
  {
    "path": "apps/web/components/ui/separator.tsx",
    "content": "\"use client\";\n\nimport * as React from \"react\";\nimport * as SeparatorPrimitive from \"@radix-ui/react-separator\";\n\nimport { cn } from \"@/lib/utils\";\n\nconst Separator = React.forwardRef<\n  React.ElementRef<typeof SeparatorPrimitive.Root>,\n  React.ComponentPropsWithoutRef<typeof SeparatorPrimitive.Root>\n>(\n  (\n    { className, orientation = \"horizontal\", decorative = true, ...props },\n    ref,\n  ) => (\n    <SeparatorPrimitive.Root\n      ref={ref}\n      decorative={decorative}\n      orientation={orientation}\n      className={cn(\n        \"shrink-0 bg-border\",\n        orientation === \"horizontal\" ? \"h-[1px] w-full\" : \"h-full w-[1px]\",\n        className,\n      )}\n      {...props}\n    />\n  ),\n);\nSeparator.displayName = SeparatorPrimitive.Root.displayName;\n\nexport { Separator };\n"
  },
  {
    "path": "apps/web/components/ui/skeleton.tsx",
    "content": "import { cn } from \"@/lib/utils\";\n\nfunction Skeleton({\n  className,\n  ...props\n}: React.HTMLAttributes<HTMLDivElement>) {\n  return (\n    <div\n      className={cn(\"animate-pulse rounded-md bg-muted\", className)}\n      {...props}\n    />\n  );\n}\n\nexport { Skeleton };\n"
  },
  {
    "path": "apps/web/components/ui/tooltip.tsx",
    "content": "\"use client\";\n\nimport * as React from \"react\";\nimport * as TooltipPrimitive from \"@radix-ui/react-tooltip\";\n\nimport { cn } from \"@/lib/utils\";\n\nconst TooltipProvider = TooltipPrimitive.Provider;\n\nconst Tooltip = TooltipPrimitive.Root;\n\nconst TooltipTrigger = TooltipPrimitive.Trigger;\n\nconst TooltipContent = React.forwardRef<\n  React.ElementRef<typeof TooltipPrimitive.Content>,\n  React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content>\n>(({ className, sideOffset = 4, ...props }, ref) => (\n  <TooltipPrimitive.Content\n    ref={ref}\n    sideOffset={sideOffset}\n    className={cn(\n      \"z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\",\n      className,\n    )}\n    {...props}\n  />\n));\nTooltipContent.displayName = TooltipPrimitive.Content.displayName;\n\nexport { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider };\n"
  },
  {
    "path": "apps/web/components.json",
    "content": "{\n  \"$schema\": \"https://ui.shadcn.com/schema.json\",\n  \"style\": \"default\",\n  \"rsc\": true,\n  \"tsx\": true,\n  \"tailwind\": {\n    \"config\": \"tailwind.config.js\",\n    \"css\": \"app/globals.css\",\n    \"baseColor\": \"slate\",\n    \"cssVariables\": true,\n    \"prefix\": \"\"\n  },\n  \"aliases\": {\n    \"components\": \"@/components\",\n    \"utils\": \"@/lib/utils\"\n  }\n}"
  },
  {
    "path": "apps/web/lib/api/client/core/ApiError.ts",
    "content": "/* generated using openapi-typescript-codegen -- do no edit */\n/* istanbul ignore file */\n/* tslint:disable */\n/* eslint-disable */\nimport type { ApiRequestOptions } from \"./ApiRequestOptions\";\nimport type { ApiResult } from \"./ApiResult\";\n\nexport class ApiError extends Error {\n  public readonly url: string;\n  public readonly status: number;\n  public readonly statusText: string;\n  public readonly body: any;\n  public readonly request: ApiRequestOptions;\n\n  constructor(\n    request: ApiRequestOptions,\n    response: ApiResult,\n    message: string,\n  ) {\n    super(message);\n\n    this.name = \"ApiError\";\n    this.url = response.url;\n    this.status = response.status;\n    this.statusText = response.statusText;\n    this.body = response.body;\n    this.request = request;\n  }\n}\n"
  },
  {
    "path": "apps/web/lib/api/client/core/ApiRequestOptions.ts",
    "content": "/* generated using openapi-typescript-codegen -- do no edit */\n/* istanbul ignore file */\n/* tslint:disable */\n/* eslint-disable */\nexport type ApiRequestOptions = {\n  readonly method:\n    | \"GET\"\n    | \"PUT\"\n    | \"POST\"\n    | \"DELETE\"\n    | \"OPTIONS\"\n    | \"HEAD\"\n    | \"PATCH\";\n  readonly url: string;\n  readonly path?: Record<string, any>;\n  readonly cookies?: Record<string, any>;\n  readonly headers?: Record<string, any>;\n  readonly query?: Record<string, any>;\n  readonly formData?: Record<string, any>;\n  readonly body?: any;\n  readonly mediaType?: string;\n  readonly responseHeader?: string;\n  readonly errors?: Record<number, string>;\n};\n"
  },
  {
    "path": "apps/web/lib/api/client/core/ApiResult.ts",
    "content": "/* generated using openapi-typescript-codegen -- do no edit */\n/* istanbul ignore file */\n/* tslint:disable */\n/* eslint-disable */\nexport type ApiResult = {\n  readonly url: string;\n  readonly ok: boolean;\n  readonly status: number;\n  readonly statusText: string;\n  readonly body: any;\n};\n"
  },
  {
    "path": "apps/web/lib/api/client/core/CancelablePromise.ts",
    "content": "/* generated using openapi-typescript-codegen -- do no edit */\n/* istanbul ignore file */\n/* tslint:disable */\n/* eslint-disable */\nexport class CancelError extends Error {\n  constructor(message: string) {\n    super(message);\n    this.name = \"CancelError\";\n  }\n\n  public get isCancelled(): boolean {\n    return true;\n  }\n}\n\nexport interface OnCancel {\n  readonly isResolved: boolean;\n  readonly isRejected: boolean;\n  readonly isCancelled: boolean;\n\n  (cancelHandler: () => void): void;\n}\n\nexport class CancelablePromise<T> implements Promise<T> {\n  #isResolved: boolean;\n  #isRejected: boolean;\n  #isCancelled: boolean;\n  readonly #cancelHandlers: (() => void)[];\n  readonly #promise: Promise<T>;\n  #resolve?: (value: T | PromiseLike<T>) => void;\n  #reject?: (reason?: any) => void;\n\n  constructor(\n    executor: (\n      resolve: (value: T | PromiseLike<T>) => void,\n      reject: (reason?: any) => void,\n      onCancel: OnCancel,\n    ) => void,\n  ) {\n    this.#isResolved = false;\n    this.#isRejected = false;\n    this.#isCancelled = false;\n    this.#cancelHandlers = [];\n    this.#promise = new Promise<T>((resolve, reject) => {\n      this.#resolve = resolve;\n      this.#reject = reject;\n\n      const onResolve = (value: T | PromiseLike<T>): void => {\n        if (this.#isResolved || this.#isRejected || this.#isCancelled) {\n          return;\n        }\n        this.#isResolved = true;\n        if (this.#resolve) this.#resolve(value);\n      };\n\n      const onReject = (reason?: any): void => {\n        if (this.#isResolved || this.#isRejected || this.#isCancelled) {\n          return;\n        }\n        this.#isRejected = true;\n        if (this.#reject) this.#reject(reason);\n      };\n\n      const onCancel = (cancelHandler: () => void): void => {\n        if (this.#isResolved || this.#isRejected || this.#isCancelled) {\n          return;\n        }\n        this.#cancelHandlers.push(cancelHandler);\n      };\n\n      Object.defineProperty(onCancel, \"isResolved\", {\n        get: (): boolean => this.#isResolved,\n      });\n\n      Object.defineProperty(onCancel, \"isRejected\", {\n        get: (): boolean => this.#isRejected,\n      });\n\n      Object.defineProperty(onCancel, \"isCancelled\", {\n        get: (): boolean => this.#isCancelled,\n      });\n\n      return executor(onResolve, onReject, onCancel as OnCancel);\n    });\n  }\n\n  get [Symbol.toStringTag]() {\n    return \"Cancellable Promise\";\n  }\n\n  public then<TResult1 = T, TResult2 = never>(\n    onFulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | null,\n    onRejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null,\n  ): Promise<TResult1 | TResult2> {\n    return this.#promise.then(onFulfilled, onRejected);\n  }\n\n  public catch<TResult = never>(\n    onRejected?: ((reason: any) => TResult | PromiseLike<TResult>) | null,\n  ): Promise<T | TResult> {\n    return this.#promise.catch(onRejected);\n  }\n\n  public finally(onFinally?: (() => void) | null): Promise<T> {\n    return this.#promise.finally(onFinally);\n  }\n\n  public cancel(): void {\n    if (this.#isResolved || this.#isRejected || this.#isCancelled) {\n      return;\n    }\n    this.#isCancelled = true;\n    if (this.#cancelHandlers.length) {\n      try {\n        for (const cancelHandler of this.#cancelHandlers) {\n          cancelHandler();\n        }\n      } catch (error) {\n        console.warn(\"Cancellation threw an error\", error);\n        return;\n      }\n    }\n    this.#cancelHandlers.length = 0;\n    if (this.#reject) this.#reject(new CancelError(\"Request aborted\"));\n  }\n\n  public get isCancelled(): boolean {\n    return this.#isCancelled;\n  }\n}\n"
  },
  {
    "path": "apps/web/lib/api/client/core/OpenAPI.ts",
    "content": "/* generated using openapi-typescript-codegen -- do no edit */\n/* istanbul ignore file */\n/* tslint:disable */\n/* eslint-disable */\nimport type { ApiRequestOptions } from \"./ApiRequestOptions\";\n\ntype Resolver<T> = (options: ApiRequestOptions) => Promise<T>;\ntype Headers = Record<string, string>;\n\nexport type OpenAPIConfig = {\n  BASE: string;\n  VERSION: string;\n  WITH_CREDENTIALS: boolean;\n  CREDENTIALS: \"include\" | \"omit\" | \"same-origin\";\n  TOKEN?: string | Resolver<string> | undefined;\n  USERNAME?: string | Resolver<string> | undefined;\n  PASSWORD?: string | Resolver<string> | undefined;\n  HEADERS?: Headers | Resolver<Headers> | undefined;\n  ENCODE_PATH?: ((path: string) => string) | undefined;\n};\n\nexport const OpenAPI: OpenAPIConfig = {\n  BASE: \"https://next-fast-turbo-api.vercel.app\",\n  VERSION: \"0.1.0\",\n  WITH_CREDENTIALS: false,\n  CREDENTIALS: \"include\",\n  TOKEN: undefined,\n  USERNAME: undefined,\n  PASSWORD: undefined,\n  HEADERS: undefined,\n  ENCODE_PATH: undefined,\n};\n"
  },
  {
    "path": "apps/web/lib/api/client/core/request.ts",
    "content": "/* generated using openapi-typescript-codegen -- do no edit */\n/* istanbul ignore file */\n/* tslint:disable */\n/* eslint-disable */\nimport axios from \"axios\";\nimport type {\n  AxiosError,\n  AxiosRequestConfig,\n  AxiosResponse,\n  AxiosInstance,\n} from \"axios\";\nimport FormData from \"form-data\";\n\nimport { ApiError } from \"./ApiError\";\nimport type { ApiRequestOptions } from \"./ApiRequestOptions\";\nimport type { ApiResult } from \"./ApiResult\";\nimport { CancelablePromise } from \"./CancelablePromise\";\nimport type { OnCancel } from \"./CancelablePromise\";\nimport type { OpenAPIConfig } from \"./OpenAPI\";\n\nexport const isDefined = <T>(\n  value: T | null | undefined,\n): value is Exclude<T, null | undefined> => {\n  return value !== undefined && value !== null;\n};\n\nexport const isString = (value: any): value is string => {\n  return typeof value === \"string\";\n};\n\nexport const isStringWithValue = (value: any): value is string => {\n  return isString(value) && value !== \"\";\n};\n\nexport const isBlob = (value: any): value is Blob => {\n  return (\n    typeof value === \"object\" &&\n    typeof value.type === \"string\" &&\n    typeof value.stream === \"function\" &&\n    typeof value.arrayBuffer === \"function\" &&\n    typeof value.constructor === \"function\" &&\n    typeof value.constructor.name === \"string\" &&\n    /^(Blob|File)$/.test(value.constructor.name) &&\n    /^(Blob|File)$/.test(value[Symbol.toStringTag])\n  );\n};\n\nexport const isFormData = (value: any): value is FormData => {\n  return value instanceof FormData;\n};\n\nexport const isSuccess = (status: number): boolean => {\n  return status >= 200 && status < 300;\n};\n\nexport const base64 = (str: string): string => {\n  try {\n    return btoa(str);\n  } catch (err) {\n    // @ts-ignore\n    return Buffer.from(str).toString(\"base64\");\n  }\n};\n\nexport const getQueryString = (params: Record<string, any>): string => {\n  const qs: string[] = [];\n\n  const append = (key: string, value: any) => {\n    qs.push(`${encodeURIComponent(key)}=${encodeURIComponent(String(value))}`);\n  };\n\n  const process = (key: string, value: any) => {\n    if (isDefined(value)) {\n      if (Array.isArray(value)) {\n        value.forEach((v) => {\n          process(key, v);\n        });\n      } else if (typeof value === \"object\") {\n        Object.entries(value).forEach(([k, v]) => {\n          process(`${key}[${k}]`, v);\n        });\n      } else {\n        append(key, value);\n      }\n    }\n  };\n\n  Object.entries(params).forEach(([key, value]) => {\n    process(key, value);\n  });\n\n  if (qs.length > 0) {\n    return `?${qs.join(\"&\")}`;\n  }\n\n  return \"\";\n};\n\nconst getUrl = (config: OpenAPIConfig, options: ApiRequestOptions): string => {\n  const encoder = config.ENCODE_PATH || encodeURI;\n\n  const path = options.url\n    .replace(\"{api-version}\", config.VERSION)\n    .replace(/{(.*?)}/g, (substring: string, group: string) => {\n      if (options.path?.hasOwnProperty(group)) {\n        return encoder(String(options.path[group]));\n      }\n      return substring;\n    });\n\n  const url = `${config.BASE}${path}`;\n  if (options.query) {\n    return `${url}${getQueryString(options.query)}`;\n  }\n  return url;\n};\n\nexport const getFormData = (\n  options: ApiRequestOptions,\n): FormData | undefined => {\n  if (options.formData) {\n    const formData = new FormData();\n\n    const process = (key: string, value: any) => {\n      if (isString(value) || isBlob(value)) {\n        formData.append(key, value);\n      } else {\n        formData.append(key, JSON.stringify(value));\n      }\n    };\n\n    Object.entries(options.formData)\n      .filter(([_, value]) => isDefined(value))\n      .forEach(([key, value]) => {\n        if (Array.isArray(value)) {\n          value.forEach((v) => process(key, v));\n        } else {\n          process(key, value);\n        }\n      });\n\n    return formData;\n  }\n  return undefined;\n};\n\ntype Resolver<T> = (options: ApiRequestOptions) => Promise<T>;\n\nexport const resolve = async <T>(\n  options: ApiRequestOptions,\n  resolver?: T | Resolver<T>,\n): Promise<T | undefined> => {\n  if (typeof resolver === \"function\") {\n    return (resolver as Resolver<T>)(options);\n  }\n  return resolver;\n};\n\nexport const getHeaders = async (\n  config: OpenAPIConfig,\n  options: ApiRequestOptions,\n  formData?: FormData,\n): Promise<Record<string, string>> => {\n  const [token, username, password, additionalHeaders] = await Promise.all([\n    resolve(options, config.TOKEN),\n    resolve(options, config.USERNAME),\n    resolve(options, config.PASSWORD),\n    resolve(options, config.HEADERS),\n  ]);\n\n  const formHeaders =\n    (typeof formData?.getHeaders === \"function\" && formData?.getHeaders()) ||\n    {};\n\n  const headers = Object.entries({\n    Accept: \"application/json\",\n    ...additionalHeaders,\n    ...options.headers,\n    ...formHeaders,\n  })\n    .filter(([_, value]) => isDefined(value))\n    .reduce(\n      (headers, [key, value]) => ({\n        ...headers,\n        [key]: String(value),\n      }),\n      {} as Record<string, string>,\n    );\n\n  if (isStringWithValue(token)) {\n    headers[\"Authorization\"] = `Bearer ${token}`;\n  }\n\n  if (isStringWithValue(username) && isStringWithValue(password)) {\n    const credentials = base64(`${username}:${password}`);\n    headers[\"Authorization\"] = `Basic ${credentials}`;\n  }\n\n  if (options.body) {\n    if (options.mediaType) {\n      headers[\"Content-Type\"] = options.mediaType;\n    } else if (isBlob(options.body)) {\n      headers[\"Content-Type\"] = options.body.type || \"application/octet-stream\";\n    } else if (isString(options.body)) {\n      headers[\"Content-Type\"] = \"text/plain\";\n    } else if (!isFormData(options.body)) {\n      headers[\"Content-Type\"] = \"application/json\";\n    }\n  }\n\n  return headers;\n};\n\nexport const getRequestBody = (options: ApiRequestOptions): any => {\n  if (options.body) {\n    return options.body;\n  }\n  return undefined;\n};\n\nexport const sendRequest = async <T>(\n  config: OpenAPIConfig,\n  options: ApiRequestOptions,\n  url: string,\n  body: any,\n  formData: FormData | undefined,\n  headers: Record<string, string>,\n  onCancel: OnCancel,\n  axiosClient: AxiosInstance,\n): Promise<AxiosResponse<T>> => {\n  const source = axios.CancelToken.source();\n\n  const requestConfig: AxiosRequestConfig = {\n    url,\n    headers,\n    data: body ?? formData,\n    method: options.method,\n    withCredentials: config.WITH_CREDENTIALS,\n    cancelToken: source.token,\n  };\n\n  onCancel(() => source.cancel(\"The user aborted a request.\"));\n\n  try {\n    return await axiosClient.request(requestConfig);\n  } catch (error) {\n    const axiosError = error as AxiosError<T>;\n    if (axiosError.response) {\n      return axiosError.response;\n    }\n    throw error;\n  }\n};\n\nexport const getResponseHeader = (\n  response: AxiosResponse<any>,\n  responseHeader?: string,\n): string | undefined => {\n  if (responseHeader) {\n    const content = response.headers[responseHeader];\n    if (isString(content)) {\n      return content;\n    }\n  }\n  return undefined;\n};\n\nexport const getResponseBody = (response: AxiosResponse<any>): any => {\n  if (response.status !== 204) {\n    return response.data;\n  }\n  return undefined;\n};\n\nexport const catchErrorCodes = (\n  options: ApiRequestOptions,\n  result: ApiResult,\n): void => {\n  const errors: Record<number, string> = {\n    400: \"Bad Request\",\n    401: \"Unauthorized\",\n    403: \"Forbidden\",\n    404: \"Not Found\",\n    500: \"Internal Server Error\",\n    502: \"Bad Gateway\",\n    503: \"Service Unavailable\",\n    ...options.errors,\n  };\n\n  const error = errors[result.status];\n  if (error) {\n    throw new ApiError(options, result, error);\n  }\n\n  if (!result.ok) {\n    const errorStatus = result.status ?? \"unknown\";\n    const errorStatusText = result.statusText ?? \"unknown\";\n    const errorBody = (() => {\n      try {\n        return JSON.stringify(result.body, null, 2);\n      } catch (e) {\n        return undefined;\n      }\n    })();\n\n    throw new ApiError(\n      options,\n      result,\n      `Generic Error: status: ${errorStatus}; status text: ${errorStatusText}; body: ${errorBody}`,\n    );\n  }\n};\n\n/**\n * Request method\n * @param config The OpenAPI configuration object\n * @param options The request options from the service\n * @param axiosClient The axios client instance to use\n * @returns CancelablePromise<T>\n * @throws ApiError\n */\nexport const request = <T>(\n  config: OpenAPIConfig,\n  options: ApiRequestOptions,\n  axiosClient: AxiosInstance = axios,\n): CancelablePromise<T> => {\n  return new CancelablePromise(async (resolve, reject, onCancel) => {\n    try {\n      const url = getUrl(config, options);\n      const formData = getFormData(options);\n      const body = getRequestBody(options);\n      const headers = await getHeaders(config, options, formData);\n\n      if (!onCancel.isCancelled) {\n        const response = await sendRequest<T>(\n          config,\n          options,\n          url,\n          body,\n          formData,\n          headers,\n          onCancel,\n          axiosClient,\n        );\n        const responseBody = getResponseBody(response);\n        const responseHeader = getResponseHeader(\n          response,\n          options.responseHeader,\n        );\n\n        const result: ApiResult = {\n          url,\n          ok: isSuccess(response.status),\n          status: response.status,\n          statusText: response.statusText,\n          body: responseHeader ?? responseBody,\n        };\n\n        catchErrorCodes(options, result);\n\n        resolve(result.body);\n      }\n    } catch (error) {\n      reject(error);\n    }\n  });\n};\n"
  },
  {
    "path": "apps/web/lib/api/client/index.ts",
    "content": "/* generated using openapi-typescript-codegen -- do no edit */\n/* istanbul ignore file */\n/* tslint:disable */\n/* eslint-disable */\nexport { ApiError } from \"./core/ApiError\";\nexport { CancelablePromise, CancelError } from \"./core/CancelablePromise\";\nexport { OpenAPI } from \"./core/OpenAPI\";\nexport type { OpenAPIConfig } from \"./core/OpenAPI\";\n\nexport type { HTTPValidationError } from \"./models/HTTPValidationError\";\nexport type { Spell } from \"./models/Spell\";\nexport type { SpellSearchResults } from \"./models/SpellSearchResults\";\nexport type { User } from \"./models/User\";\nexport type { UserCreate } from \"./models/UserCreate\";\nexport type { UserSearchResults } from \"./models/UserSearchResults\";\nexport type { ValidationError } from \"./models/ValidationError\";\n\nexport { SpellsService } from \"./services/SpellsService\";\nexport { UsersService } from \"./services/UsersService\";\n"
  },
  {
    "path": "apps/web/lib/api/client/models/HTTPValidationError.ts",
    "content": "/* generated using openapi-typescript-codegen -- do no edit */\n/* istanbul ignore file */\n/* tslint:disable */\n/* eslint-disable */\nimport type { ValidationError } from \"./ValidationError\";\nexport type HTTPValidationError = {\n  detail?: Array<ValidationError>;\n};\n"
  },
  {
    "path": "apps/web/lib/api/client/models/Spell.ts",
    "content": "/* generated using openapi-typescript-codegen -- do no edit */\n/* istanbul ignore file */\n/* tslint:disable */\n/* eslint-disable */\nexport type Spell = {\n  id: string;\n  name: string;\n  description: string;\n};\n"
  },
  {
    "path": "apps/web/lib/api/client/models/SpellSearchResults.ts",
    "content": "/* generated using openapi-typescript-codegen -- do no edit */\n/* istanbul ignore file */\n/* tslint:disable */\n/* eslint-disable */\nimport type { Spell } from \"./Spell\";\nexport type SpellSearchResults = {\n  results: Array<Spell>;\n};\n"
  },
  {
    "path": "apps/web/lib/api/client/models/User.ts",
    "content": "/* generated using openapi-typescript-codegen -- do no edit */\n/* istanbul ignore file */\n/* tslint:disable */\n/* eslint-disable */\nexport type User = {\n  id: string;\n  forename: string;\n  surname: string;\n  email: string;\n};\n"
  },
  {
    "path": "apps/web/lib/api/client/models/UserCreate.ts",
    "content": "/* generated using openapi-typescript-codegen -- do no edit */\n/* istanbul ignore file */\n/* tslint:disable */\n/* eslint-disable */\nexport type UserCreate = {\n  forename: string;\n  surname: string;\n  email: string;\n};\n"
  },
  {
    "path": "apps/web/lib/api/client/models/UserSearchResults.ts",
    "content": "/* generated using openapi-typescript-codegen -- do no edit */\n/* istanbul ignore file */\n/* tslint:disable */\n/* eslint-disable */\nimport type { User } from \"./User\";\nexport type UserSearchResults = {\n  results: Array<User>;\n};\n"
  },
  {
    "path": "apps/web/lib/api/client/models/ValidationError.ts",
    "content": "/* generated using openapi-typescript-codegen -- do no edit */\n/* istanbul ignore file */\n/* tslint:disable */\n/* eslint-disable */\nexport type ValidationError = {\n  loc: Array<string | number>;\n  msg: string;\n  type: string;\n};\n"
  },
  {
    "path": "apps/web/lib/api/client/services/SpellsService.ts",
    "content": "/* generated using openapi-typescript-codegen -- do no edit */\n/* istanbul ignore file */\n/* tslint:disable */\n/* eslint-disable */\nimport type { Spell } from \"../models/Spell\";\nimport type { SpellSearchResults } from \"../models/SpellSearchResults\";\nimport type { CancelablePromise } from \"../core/CancelablePromise\";\nimport { OpenAPI } from \"../core/OpenAPI\";\nimport { request as __request } from \"../core/request\";\nexport class SpellsService {\n  /**\n   * Get Spell\n   * Returns a spell from a spell_id.\n   *\n   * **Returns:**\n   * - spell: spell object.\n   * @returns Spell Successful Response\n   * @throws ApiError\n   */\n  public static spellsGetSpell({\n    spellId,\n  }: {\n    spellId: string;\n  }): CancelablePromise<Spell> {\n    return __request(OpenAPI, {\n      method: \"GET\",\n      url: \"/api/v1/spells/get/\",\n      query: {\n        spell_id: spellId,\n      },\n      errors: {\n        404: `Not found`,\n        422: `Validation Error`,\n      },\n    });\n  }\n  /**\n   * Get All Spells\n   * Returns a list of all spells.\n   *\n   * **Returns:**\n   * - list[spell]: List of all spells.\n   * @returns Spell Successful Response\n   * @throws ApiError\n   */\n  public static spellsGetAllSpells(): CancelablePromise<Array<Spell>> {\n    return __request(OpenAPI, {\n      method: \"GET\",\n      url: \"/api/v1/spells/get-all/\",\n      errors: {\n        404: `Not found`,\n      },\n    });\n  }\n  /**\n   * Search Spells\n   * Search for spells based on a keyword and return the top `max_results` items.\n   *\n   * **Args:**\n   * - keyword (str, optional): The keyword to search for. Defaults to None.\n   * - max_results (int, optional): The maximum number of search results to return. Defaults to 10.\n   * - search_on (str, optional): The field to perform the search on. Defaults to \"email\".\n   *\n   * **Returns:**\n   * - spellSearchResults: Object containing a list of the top `max_results` items that match the keyword.\n   * @returns SpellSearchResults Successful Response\n   * @throws ApiError\n   */\n  public static spellsSearchSpells({\n    searchOn = \"spells\",\n    keyword,\n    maxResults,\n  }: {\n    searchOn?: \"id\" | \"spells\" | \"description\";\n    keyword?: string | number | null;\n    maxResults?: number | null;\n  }): CancelablePromise<SpellSearchResults> {\n    return __request(OpenAPI, {\n      method: \"GET\",\n      url: \"/api/v1/spells/search/\",\n      query: {\n        search_on: searchOn,\n        keyword: keyword,\n        max_results: maxResults,\n      },\n      errors: {\n        404: `Not found`,\n        422: `Validation Error`,\n      },\n    });\n  }\n}\n"
  },
  {
    "path": "apps/web/lib/api/client/services/UsersService.ts",
    "content": "/* generated using openapi-typescript-codegen -- do no edit */\n/* istanbul ignore file */\n/* tslint:disable */\n/* eslint-disable */\nimport type { User } from \"../models/User\";\nimport type { UserCreate } from \"../models/UserCreate\";\nimport type { UserSearchResults } from \"../models/UserSearchResults\";\nimport type { CancelablePromise } from \"../core/CancelablePromise\";\nimport { OpenAPI } from \"../core/OpenAPI\";\nimport { request as __request } from \"../core/request\";\nexport class UsersService {\n  /**\n   * Get User\n   * Returns a user from a user_id.\n   *\n   * **Returns:**\n   * - User: User object.\n   * @returns User Successful Response\n   * @throws ApiError\n   */\n  public static usersGetUser({\n    userId,\n  }: {\n    userId: string;\n  }): CancelablePromise<User> {\n    return __request(OpenAPI, {\n      method: \"GET\",\n      url: \"/api/v1/users/get/\",\n      query: {\n        user_id: userId,\n      },\n      errors: {\n        404: `Not found`,\n        422: `Validation Error`,\n      },\n    });\n  }\n  /**\n   * Get All Users\n   * Returns a list of all users.\n   *\n   * **Returns:**\n   * - list[User]: List of all users.\n   * @returns User Successful Response\n   * @throws ApiError\n   */\n  public static usersGetAllUsers(): CancelablePromise<Array<User>> {\n    return __request(OpenAPI, {\n      method: \"GET\",\n      url: \"/api/v1/users/get-all/\",\n      errors: {\n        404: `Not found`,\n      },\n    });\n  }\n  /**\n   * Search Users\n   * Search for users based on a keyword and return the top `max_results` items.\n   *\n   * **Args:**\n   * - keyword (str, optional): The keyword to search for. Defaults to None.\n   * - max_results (int, optional): The maximum number of search results to return. Defaults to 10.\n   * - search_on (str, optional): The field to perform the search on. Defaults to \"email\".\n   *\n   * **Returns:**\n   * - UserSearchResults: Object containing a list of the top `max_results` items that match the keyword.\n   * @returns UserSearchResults Successful Response\n   * @throws ApiError\n   */\n  public static usersSearchUsers({\n    searchOn = \"email\",\n    keyword,\n    maxResults,\n  }: {\n    searchOn?: \"id\" | \"email\" | \"forename\" | \"surname\";\n    keyword?: string | number | null;\n    maxResults?: number | null;\n  }): CancelablePromise<UserSearchResults> {\n    return __request(OpenAPI, {\n      method: \"GET\",\n      url: \"/api/v1/users/search/\",\n      query: {\n        search_on: searchOn,\n        keyword: keyword,\n        max_results: maxResults,\n      },\n      errors: {\n        404: `Not found`,\n        422: `Validation Error`,\n      },\n    });\n  }\n  /**\n   * Create User\n   * Craete a new user.\n   *\n   * **Args:**\n   * - user_in (UserCreate): JSON of the user to create. Forename, surname and email. Email must be unique.\n   *\n   * **Returns:**\n   * - User: User object\n   * @returns User Successful Response\n   * @throws ApiError\n   */\n  public static usersCreateUser({\n    requestBody,\n  }: {\n    requestBody: UserCreate;\n  }): CancelablePromise<User> {\n    return __request(OpenAPI, {\n      method: \"POST\",\n      url: \"/api/v1/users/create\",\n      body: requestBody,\n      mediaType: \"application/json\",\n      errors: {\n        404: `Not found`,\n        422: `Validation Error`,\n      },\n    });\n  }\n}\n"
  },
  {
    "path": "apps/web/lib/config/index.ts",
    "content": "export * from \"./nav.tsx\";\n"
  },
  {
    "path": "apps/web/lib/config/nav.tsx",
    "content": "import { Icons } from \"@/components/icons\";\n\nexport type NavConfig = typeof navConfig;\n\nexport const navConfig = {\n  navLinks: [\n    {\n      icon: <Icons.home className=\"h-5 w-5\" />,\n      iconMobile: <Icons.home className=\"h-5 w-5\" />,\n      label: \"Overview\",\n      href: \"/\",\n      pageTitle: \"Overview\",\n      navLocation: \"top\",\n    },\n    {\n      icon: <Icons.settings className=\"h-5 w-5\" />,\n      iconMobile: <Icons.settings className=\"h-5 w-5\" />,\n      label: \"Settings\",\n      href: \"/settings/\",\n      pageTitle: \"Account settings\",\n      navLocation: \"bottom\",\n    },\n    {\n      icon: <Icons.file className=\"h-5 w-5\" />,\n      iconMobile: <Icons.file className=\"h-5 w-5\" />,\n      label: \"Help\",\n      href: \"https://next-fast-turbo.mintlify.app/\",\n      pageTitle: \"Documentation\",\n      navLocation: \"bottom\",\n    },\n  ],\n};\n"
  },
  {
    "path": "apps/web/lib/twConfig.ts",
    "content": "import { content, theme } from \"@/tailwind.config\";\nimport resolveConfig from \"tailwindcss/resolveConfig\";\nimport type { DefaultColors } from \"tailwindcss/types/generated/colors\";\n\nexport const fullTwConfig = resolveConfig({\n  content,\n  theme,\n});\n\ninterface TailwindCustomColours extends DefaultColors {\n  border: string;\n  input: string;\n  ring: string;\n  background: string;\n  foreground: string;\n  primary: {\n    DEFAULT: string;\n    foreground: string;\n  };\n  secondary: {\n    DEFAULT: string;\n    foreground: string;\n  };\n  destructive: {\n    DEFAULT: string;\n    foreground: string;\n  };\n  muted: {\n    DEFAULT: string;\n    foreground: string;\n  };\n  accent: {\n    DEFAULT: string;\n    foreground: string;\n  };\n  popover: {\n    DEFAULT: string;\n    foreground: string;\n  };\n  card: {\n    DEFAULT: string;\n    foreground: string;\n  };\n}\n\nexport const twColourConfig: TailwindCustomColours = fullTwConfig.theme\n  .colors as TailwindCustomColours;\n"
  },
  {
    "path": "apps/web/lib/utils.ts",
    "content": "import { type ClassValue, clsx } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n  return twMerge(clsx(inputs));\n}\n"
  },
  {
    "path": "apps/web/next-env.d.ts",
    "content": "/// <reference types=\"next\" />\n/// <reference types=\"next/image-types/global\" />\n\n// NOTE: This file should not be edited\n// see https://nextjs.org/docs/basic-features/typescript for more information.\n"
  },
  {
    "path": "apps/web/next.config.js",
    "content": "/** @type {import('next').NextConfig} */\nconst nextConfig = {\n  reactStrictMode: true,\n  swcMinify: true,\n  trailingSlash: true,\n};\n\nmodule.exports = nextConfig;\n"
  },
  {
    "path": "apps/web/package.json",
    "content": "{\n  \"name\": \"web\",\n  \"version\": \"1.0.0\",\n  \"private\": true,\n  \"scripts\": {\n    \"dev\": \"next dev\",\n    \"dev:turbo\": \"next dev --turbo\",\n    \"build\": \"next build\",\n    \"build:turbo\": \"turbo build\",\n    \"start\": \"next start\",\n    \"lint\": \"eslint . --max-warnings 0\",\n    \"ui:add\": \"pnpm dlx shadcn-ui@latest add\",\n    \"generate-client\": \"openapi --input https://next-fast-turbo-api.vercel.app/openapi.json --output ./lib/api/client --client axios --useOptions --useUnionTypes\",\n    \"generate-client:dev\": \"openapi --input http://127.0.0.0:8000/openapi.json --output ./lib/api/client --client axios --useOptions --useUnionTypes\"\n  },\n  \"dependencies\": {\n    \"@hookform/resolvers\": \"^3.3.4\",\n    \"@radix-ui/react-dropdown-menu\": \"^2.0.6\",\n    \"@radix-ui/react-icons\": \"^1.3.0\",\n    \"@radix-ui/react-label\": \"^2.0.2\",\n    \"@radix-ui/react-radio-group\": \"^1.1.3\",\n    \"@radix-ui/react-separator\": \"^1.0.3\",\n    \"@radix-ui/react-slot\": \"^1.0.2\",\n    \"@radix-ui/react-tooltip\": \"^1.0.7\",\n    \"axios\": \"^1.6.7\",\n    \"class-variance-authority\": \"^0.7.0\",\n    \"clsx\": \"^2.1.0\",\n    \"form-data\": \"^4.0.0\",\n    \"framer-motion\": \"^11.0.5\",\n    \"hamburger-react\": \"^2.5.0\",\n    \"lucide-react\": \"^0.220.0\",\n    \"next\": \"^14.1.0\",\n    \"next-themes\": \"^0.2.1\",\n    \"react\": \"^18.2.0\",\n    \"react-dom\": \"^18.2.0\",\n    \"react-hook-form\": \"^7.50.1\",\n    \"react-use\": \"^17.5.0\",\n    \"recharts\": \"^2.12.0\",\n    \"tailwind-merge\": \"^2.2.1\",\n    \"tailwindcss-animate\": \"^1.0.7\",\n    \"tailwindcss-text-fill\": \"^0.2.0\",\n    \"zod\": \"^3.22.4\"\n  },\n  \"devDependencies\": {\n    \"@next/eslint-plugin-next\": \"^14.0.4\",\n    \"@repo/eslint-config\": \"workspace:*\",\n    \"@repo/typescript-config\": \"workspace:*\",\n    \"@types/eslint\": \"^8.56.1\",\n    \"@types/node\": \"^20.10.6\",\n    \"@types/react\": \"^18.2.46\",\n    \"@types/react-dom\": \"^18.2.18\",\n    \"autoprefixer\": \"^10.4.17\",\n    \"cross-env\": \"^7.0.3\",\n    \"eslint\": \"^8.56.0\",\n    \"eslint-config-turbo\": \"^1.11.3\",\n    \"openapi-typescript-codegen\": \"^0.27.0\",\n    \"postcss\": \"^8.4.35\",\n    \"tailwindcss\": \"^3.4.1\",\n    \"typescript\": \"^5.3.3\"\n  }\n}"
  },
  {
    "path": "apps/web/postcss.config.js",
    "content": "module.exports = {\n  plugins: {\n    tailwindcss: {},\n    autoprefixer: {},\n  },\n};\n"
  },
  {
    "path": "apps/web/tailwind.config.js",
    "content": "/** @type {import('tailwindcss').Config} */\nconst { fontFamily } = require(\"tailwindcss/defaultTheme\");\n\nmodule.exports = {\n  darkMode: [\"class\"],\n  content: [\n    \"./pages/**/*.{ts,tsx}\",\n    \"./components/**/*.{ts,tsx}\",\n    \"./app/**/*.{ts,tsx}\",\n    \"./src/**/*.{ts,tsx}\",\n  ],\n  prefix: \"\",\n  theme: {\n    container: {\n      center: true,\n      padding: \"2rem\",\n      screens: {\n        \"2xl\": \"1400px\",\n      },\n    },\n    extend: {\n      fontFamily: {\n        sans: [\"var(--font-sans)\", ...fontFamily.sans],\n      },\n      colors: {\n        border: \"hsl(var(--border))\",\n        input: \"hsl(var(--input))\",\n        ring: \"hsl(var(--ring))\",\n        background: \"hsl(var(--background))\",\n        foreground: \"hsl(var(--foreground))\",\n        primary: {\n          DEFAULT: \"hsl(var(--primary))\",\n          foreground: \"hsl(var(--primary-foreground))\",\n        },\n        secondary: {\n          DEFAULT: \"hsl(var(--secondary))\",\n          foreground: \"hsl(var(--secondary-foreground))\",\n        },\n        destructive: {\n          DEFAULT: \"hsl(var(--destructive))\",\n          foreground: \"hsl(var(--destructive-foreground))\",\n        },\n        muted: {\n          DEFAULT: \"hsl(var(--muted))\",\n          foreground: \"hsl(var(--muted-foreground))\",\n        },\n        accent: {\n          DEFAULT: \"hsl(var(--accent))\",\n          foreground: \"hsl(var(--accent-foreground))\",\n        },\n        popover: {\n          DEFAULT: \"hsl(var(--popover))\",\n          foreground: \"hsl(var(--popover-foreground))\",\n        },\n        card: {\n          DEFAULT: \"hsl(var(--card))\",\n          foreground: \"hsl(var(--card-foreground))\",\n        },\n      },\n      borderRadius: {\n        lg: \"var(--radius)\",\n        md: \"calc(var(--radius) - 2px)\",\n        sm: \"calc(var(--radius) - 4px)\",\n      },\n      keyframes: {\n        \"accordion-down\": {\n          from: { height: \"0\" },\n          to: { height: \"var(--radix-accordion-content-height)\" },\n        },\n        \"accordion-up\": {\n          from: { height: \"var(--radix-accordion-content-height)\" },\n          to: { height: \"0\" },\n        },\n      },\n      animation: {\n        \"accordion-down\": \"accordion-down 0.2s ease-out\",\n        \"accordion-up\": \"accordion-up 0.2s ease-out\",\n      },\n    },\n  },\n  // tailwindcss-text-fill - used for overriding styling of autofill inputs in forms: https://www.npmjs.com/package/tailwindcss-text-fill\n  // tailwindcss-animate - adds animation utilities: https://github.com/jamiebuilds/tailwindcss-animate\n  plugins: [require(\"tailwindcss-animate\"), require(\"tailwindcss-text-fill\")],\n};\n"
  },
  {
    "path": "apps/web/tsconfig.json",
    "content": "{\n  \"extends\": \"@repo/typescript-config/nextjs.json\",\n  \"compilerOptions\": {\n    \"sourceMap\": true,\n    \"plugins\": [\n      {\n        \"name\": \"next\"\n      }\n    ],\n    \"baseUrl\": \".\",\n    \"paths\": {\n      \"@/*\": [\"./*\"],\n      \"@/components/*\": [\"./components/*\"],\n      \"@/lib/*\": [\"./lib/*\"]\n    }\n  },\n  \"include\": [\n    \"next-env.d.ts\",\n    \"next.config.js\",\n    \"**/*.ts\",\n    \"**/*.tsx\",\n    \".next/types/**/*.ts\"\n  ],\n  \"exclude\": [\"node_modules\"]\n}\n"
  },
  {
    "path": "package.json",
    "content": "{\n  \"name\": \"next-fast-turbo\",\n  \"private\": true,\n  \"scripts\": {\n    \"build\": \"turbo build\",\n    \"dev\": \"turbo dev\",\n    \"lint\": \"turbo lint\",\n    \"format\": \"prettier --write \\\"**/*.{ts,tsx,md}\\\"\"\n  },\n  \"devDependencies\": {\n    \"@repo/eslint-config\": \"workspace:*\",\n    \"@repo/typescript-config\": \"workspace:*\",\n    \"prettier\": \"^3.1.1\",\n    \"turbo\": \"^1.12.4\"\n  },\n  \"packageManager\": \"pnpm@8.9.0\",\n  \"engines\": {\n    \"node\": \">=18\"\n  }\n}"
  },
  {
    "path": "packages/eslint-config/README.md",
    "content": "# `@turbo/eslint-config`\n\nCollection of internal eslint configurations.\n"
  },
  {
    "path": "packages/eslint-config/library.js",
    "content": "const { resolve } = require(\"node:path\");\n\nconst project = resolve(process.cwd(), \"tsconfig.json\");\n\n/** @type {import(\"eslint\").Linter.Config} */\nmodule.exports = {\n  extends: [\"eslint:recommended\", \"prettier\", \"eslint-config-turbo\"],\n  plugins: [\"only-warn\"],\n  globals: {\n    React: true,\n    JSX: true,\n  },\n  env: {\n    node: true,\n  },\n  settings: {\n    \"import/resolver\": {\n      typescript: {\n        project,\n      },\n    },\n  },\n  ignorePatterns: [\n    // Ignore dotfiles\n    \".*.js\",\n    \"node_modules/\",\n    \"dist/\",\n  ],\n  overrides: [\n    {\n      files: [\"*.js?(x)\", \"*.ts?(x)\"],\n    },\n  ],\n};\n"
  },
  {
    "path": "packages/eslint-config/next.js",
    "content": "const { resolve } = require(\"node:path\");\n\nconst project = resolve(process.cwd(), \"tsconfig.json\");\n\n/** @type {import(\"eslint\").Linter.Config} */\nmodule.exports = {\n  extends: [\n    \"eslint:recommended\",\n    \"prettier\",\n    require.resolve(\"@vercel/style-guide/eslint/next\"),\n    \"eslint-config-turbo\",\n  ],\n  globals: {\n    React: true,\n    JSX: true,\n  },\n  env: {\n    node: true,\n    browser: true,\n  },\n  plugins: [\"only-warn\"],\n  settings: {\n    \"import/resolver\": {\n      typescript: {\n        project,\n      },\n    },\n  },\n  ignorePatterns: [\n    // Ignore dotfiles\n    \".*.js\",\n    \"node_modules/\",\n    \"tailwind.config.js\",\n    \"postcss.config.js\",\n  ],\n  overrides: [{ files: [\"*.js?(x)\", \"*.ts?(x)\"] }],\n};\n"
  },
  {
    "path": "packages/eslint-config/package.json",
    "content": "{\n  \"name\": \"@repo/eslint-config\",\n  \"version\": \"0.0.0\",\n  \"private\": true,\n  \"files\": [\n    \"library.js\",\n    \"next.js\",\n    \"react-internal.js\"\n  ],\n  \"devDependencies\": {\n    \"@vercel/style-guide\": \"^5.1.0\",\n    \"eslint-config-turbo\": \"^1.11.3\",\n    \"eslint-config-prettier\": \"^9.1.0\",\n    \"eslint-plugin-only-warn\": \"^1.1.0\",\n    \"@typescript-eslint/parser\": \"^6.17.0\",\n    \"@typescript-eslint/eslint-plugin\": \"^6.17.0\",\n    \"typescript\": \"^5.3.3\"\n  }\n}\n"
  },
  {
    "path": "packages/eslint-config/react-internal.js",
    "content": "const { resolve } = require(\"node:path\");\n\nconst project = resolve(process.cwd(), \"tsconfig.json\");\n\n/*\n * This is a custom ESLint configuration for use with\n * internal (bundled by their consumer) libraries\n * that utilize React.\n *\n * This config extends the Vercel Engineering Style Guide.\n * For more information, see https://github.com/vercel/style-guide\n *\n */\n\n/** @type {import(\"eslint\").Linter.Config} */\nmodule.exports = {\n  extends: [\"eslint:recommended\", \"prettier\", \"eslint-config-turbo\"],\n  plugins: [\"only-warn\"],\n  globals: {\n    React: true,\n    JSX: true,\n  },\n  env: {\n    browser: true,\n  },\n  settings: {\n    \"import/resolver\": {\n      typescript: {\n        project,\n      },\n    },\n  },\n  ignorePatterns: [\n    // Ignore dotfiles\n    \".*.js\",\n    \"node_modules/\",\n    \"dist/\",\n  ],\n  overrides: [\n    // Force ESLint to detect .tsx files\n    { files: [\"*.js?(x)\", \"*.ts?(x)\"] },\n  ],\n};\n"
  },
  {
    "path": "packages/typescript-config/base.json",
    "content": "{\n  \"$schema\": \"https://json.schemastore.org/tsconfig\",\n  \"display\": \"Default\",\n  \"compilerOptions\": {\n    \"composite\": false,\n    \"declaration\": true,\n    \"declarationMap\": true,\n    \"esModuleInterop\": true,\n    \"forceConsistentCasingInFileNames\": true,\n    \"allowImportingTsExtensions\": true,\n    \"noEmit\": true,\n    \"inlineSources\": false,\n    \"isolatedModules\": true,\n    \"moduleResolution\": \"node\",\n    \"noUnusedLocals\": false,\n    \"noUnusedParameters\": false,\n    \"preserveWatchOutput\": true,\n    \"skipLibCheck\": true,\n    \"strict\": true,\n    \"strictNullChecks\": true,\n    \"target\": \"ES2022\"\n  },\n  \"exclude\": [\"node_modules\"]\n}"
  },
  {
    "path": "packages/typescript-config/nextjs.json",
    "content": "{\n  \"$schema\": \"https://json.schemastore.org/tsconfig\",\n  \"display\": \"Next.js\",\n  \"extends\": \"./base.json\",\n  \"compilerOptions\": {\n    \"plugins\": [\n      {\n        \"name\": \"next\"\n      }\n    ],\n    \"allowJs\": true,\n    \"declaration\": false,\n    \"declarationMap\": false,\n    \"incremental\": true,\n    \"jsx\": \"preserve\",\n    \"lib\": [\n      \"dom\",\n      \"dom.iterable\",\n      \"esnext\",\n    ],\n    \"module\": \"esnext\",\n    \"resolveJsonModule\": true,\n    \"strict\": false,\n    \"target\": \"es2022\"\n  },\n  \"include\": [\n    \"src\",\n    \"next-env.d.ts\"\n  ],\n  \"exclude\": [\n    \"node_modules\"\n  ]\n}"
  },
  {
    "path": "packages/typescript-config/package.json",
    "content": "{\n  \"name\": \"@repo/typescript-config\",\n  \"version\": \"0.0.0\",\n  \"private\": true,\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  }\n}"
  },
  {
    "path": "packages/typescript-config/react-library.json",
    "content": "{\n  \"$schema\": \"https://json.schemastore.org/tsconfig\",\n  \"display\": \"React Library\",\n  \"extends\": \"./base.json\",\n  \"compilerOptions\": {\n    \"lib\": [\n      \"es2022\",\n      \"DOM\",\n      \"esnext\"\n    ],\n    \"module\": \"esnext\",\n    \"target\": \"es2022\",\n    \"jsx\": \"react-jsx\",\n    \"noEmit\": true\n  }\n}"
  },
  {
    "path": "pnpm-workspace.yaml",
    "content": "packages:\n  - \"apps/*\"\n  - \"packages/*\"\n"
  },
  {
    "path": "tsconfig.json",
    "content": "{\n  \"extends\": \"@repo/typescript-config/base.json\"\n}\n"
  },
  {
    "path": "turbo.json",
    "content": "{\n  \"$schema\": \"https://turbo.build/schema.json\",\n  \"globalDependencies\": [\n    \"**/.env\"\n  ],\n  \"globalEnv\": [\n    \"NODE_ENV\"\n  ],\n  \"globalDotEnv\": [\n    \".env\",\n    \".env.local\"\n  ],\n  \"pipeline\": {\n    \"build\": {\n      \"dependsOn\": [\n        \"^build\"\n      ],\n      \"outputs\": [\n        \".next/**\",\n        \"!.next/cache/**\",\n        \"dist/**\"\n      ]\n    },\n    \"lint\": {\n      \"dependsOn\": [\n        \"^lint\"\n      ]\n    },\n    \"dev\": {\n      \"cache\": false,\n      \"persistent\": true\n    }\n  }\n}"
  }
]