25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

README.md 3.0 KiB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. # VMS Backend
  2. **goals to be met**:
  3. <ul>
  4. <li> Create and set up main database on a PostgreSQL server</li>
  5. <li> Set up basic GET requests for Users, Vehicles, Assignments </li>
  6. <li> Set up POST requests for Users, Vehicles, Assignments </li>
  7. <li> Add token/cookie(?) authentication </li>
  8. </ul>
  9. # Let's keep updating this readme.md file as we complete our tasks
  10. ## How to launch
  11. First, make sure that python is installed. Create a virtual environment (if you want to)
  12. ```
  13. python -m venv venv
  14. source /venv/bin/activate
  15. ```
  16. (not necessary)
  17. run the docker image provided to launch postgresql (telegram)
  18. install dependencies:
  19. ```
  20. pip install -r requirements.txt
  21. ```
  22. open terminal in the **app** directory, and launch with:
  23. ```
  24. uvicorn main:app --reload
  25. ```
  26. OR
  27. ```
  28. python3 -m uvicorn main:app --reload
  29. ```
  30. ## Explaining the file structure
  31. ```
  32. app //main app
  33. |-alembic //Alembic -- database migration manager. Helps keep databases in sync and changeable (handles all SQL logic and keeps everything up-to-date)
  34. | |- //All files irrelevant
  35. |-apis //Stores the actual API Endpoints.
  36. | |-v1 //Main API endpoints
  37. |-core //Core project components
  38. |-db //Stores database information and data
  39. | |-models //Stores database models (represents SQL Tables)
  40. | |-repository //Stores scripts to create, update and interact with the database
  41. |-schemas //Stores Pydantic data models (Kind of like db/models except for use in the API itself, not just the database. Uses for data validation and stuff)
  42. ```
  43. ## Git Guide
  44. - [Git Reference](http://git.github.io/git-reference): despite its name it is more of a user guide.
  45. - ["Pro Git" Book](http://git-scm.com/book): by a core developer, also a thorough user guide.
  46. - [Git Documentation](http://git-scm.com/documentation): the official reference (also accessible with `git help command`)
  47. - [Think Like a Git](http://think-like-a-git.net/): a course for "advanced beginners" that know basic committing but want to make sense of the Git model. Especially useful if you come from SVN to really clear misconceptions about git.
  48. - [Git Concepts Simplified](http://gitolite.com/gcs/): Similar to the previous link, but less in-depth and more straightforward.
  49. - [Git Immersion](http://gitimmersion.com/): learn Git by using it on carefully crafted examples of increasing complexity.
  50. - [Git from the bottom up](http://ftp.newartisans.com/pub/git.from.bottom.up.pdf): A book to learn git by first understanding the simplicity and beauty of its internals.
  51. - [Git Magic](http://www-cs-students.stanford.edu/~blynn/gitmagic/): complete opposite of "Git from the bottom up" in that it treats Git as a magical gizmo you'll learn to use without drowning into the underlying storage and history model.
  52. - [Git questions on StackOverflow](http://stackoverflow.com/questions/tagged/git): comprehensive coverage of advanced matters.
  53. - [Top 10 Git Tutorials for Beginners](http://sixrevisions.com/resources/git-tutorials-beginners/): A list of tutorials and resources. Contains another list of far more than 10 sites at the end.