{"id":21195047,"url":"https://github.com/plusk01/mechatronics-backend","last_synced_at":"2026-04-28T19:33:45.875Z","repository":{"id":19099462,"uuid":"22327719","full_name":"plusk01/mechatronics-backend","owner":"plusk01","description":"Django API for byumechatronics.com","archived":false,"fork":false,"pushed_at":"2018-09-09T19:48:50.000Z","size":31,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2026-01-01T21:52:52.375Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://byumechatronics.com","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/plusk01.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-07-28T02:00:04.000Z","updated_at":"2018-09-09T19:48:51.000Z","dependencies_parsed_at":"2022-09-25T04:35:26.568Z","dependency_job_id":null,"html_url":"https://github.com/plusk01/mechatronics-backend","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/plusk01/mechatronics-backend","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plusk01%2Fmechatronics-backend","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plusk01%2Fmechatronics-backend/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plusk01%2Fmechatronics-backend/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plusk01%2Fmechatronics-backend/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/plusk01","download_url":"https://codeload.github.com/plusk01/mechatronics-backend/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plusk01%2Fmechatronics-backend/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32396143,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-28T14:34:11.604Z","status":"ssl_error","status_checked_at":"2026-04-28T14:32:37.009Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-20T19:25:53.082Z","updated_at":"2026-04-28T19:33:45.840Z","avatar_url":"https://github.com/plusk01.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"BYU Mechatronics API\n====================\n\nThis is the 'backend' or API of the [BYU Mechatronics Frontend](https://github.com/plusk01/mechatronics-backend).\n\nTo setup and run on a Mac or Linux machine follow the following steps:\n\n1. Setup your production environment\n2. Installing your app\n3. Setup a proxy to your app\n\n### Setting Up a Production Environment ###\n\nThe following assumes Ubuntu 14.04, but should be relatively transferrable to other *nix based machines.\n\n*See [Starting a Django 1.6 Project the Right Way](http://www.jeffknupp.com/blog/2013/12/18/starting-a-django-16-project-the-right-way/).*\n\n1. Update your package manager and upgrade your machine.\n\n    ```bash\n    sudo apt-get update \u0026\u0026 sudo apt-get upgrade\n    ```\n\n2. Install `pip`, Python's package manager:\n\n    ```bash\n    sudo apt-get install python-pip\n    ```\n\n3. Install `virtualenvwrapper` to create virtual Python environments for your Python apps. This is good practice because different apps often require different dependency versions. This separates those concerns:\n\n    ```bash\n    pip install virtualenvwrapper\n    ```\n\n4. Add the following to your shell's startup (`.profile`, `.bashrc`, etc):\n\n    ```bash\n    export WORKON_HOME=/var/www/apps/.virtualenvs\n    export PROJECT_HOME=/var/www/apps\n    source /usr/local/bin/virtualenvwrapper.sh\n    ```\n\n5. Reload your startup file:\n\n    ```bash\n    source .profile\n    ```\n\n6. Install your database of choice. We will install `postgres`:\n\n    ```bash\n    sudo apt-get install postgresql postgresql-contrib libpq-dev python-dev libncurses5-dev\n    ```\n\n### Installing App ###\n\n1. Create an apps directory to house your app:\n\n    ```bash\n    mkdir ~/apps\n    ```\n\n2. Clone the repo onto the machine and `cd` into it:\n\n    ```bash\n    git clone https://github.com/plusk01/mechatronics-backend.git\n    cd /var/www/apps/mechatronics-backend\n    ```\n\n3. Create a virtual environment for your app:\n\n    ```bash\n    mkvirtualenv mechatronics\n    ```\n\n4. Install app dependencies into your virtualenv:\n\n    ```bash\n    pip install -r requirements.txt\n    ```\n\n5. Create a `postgres` role:\n\n    ```bash\n    sudo -i -u postgres\n    createuser --interactive # (don't allow super user or creating db)\n    ```\n\n6. Create a database:\n    \n    ```bash\n    createdb your-database-name\n    ```\n\n7. Grant privileges to your user for the database:\n\n    ```bash\n    psql -c \"GRANT ALL PRIVILEGES ON DATABASE your-database-name TO your-user-name\"\n    ```\n\n8. Set a password for your user:\n\n    ```bash\n    psql -c \"ALTER USER your-user-name WITH PASSWORD 'yourpassword';\"\n    ```\n\n9. Copy the `mechatronics/local_settings.py.backup` to `mechatronics/local_settings.py` and make the `DATABASES` entry look like:\n\n     ```python\n     DATABASES = {\n         'default': {\n             'ENGINE': 'django.db.backends.postgresql_psycopg2',\n             'NAME': 'your-database-name',\n             'USER': 'your-user-name',\n             'PASSWORD': 'yourpassword',\n             'HOST': 'localhost',\n         }\n     }\n     ```\n10. With the virtualenv activated, run the following command inside of '/var/www/apps/mechatronics-backend/':\n\n    ```bash\n    python manage.py syncdb\n    ```\n\n    Follow instructions to create a superuser.\n\n11. Set the `STATIC_ROOT` to the appropriate directory:\n\n    ```python\n    STATIC_ROOT = '/var/www/apps/mechatronics-static'\n    ```\n\n12. Collect all the static files with the following:\n\n    ```bash\n    python manage.py collectstatic\n    ```\n\n### Setting Up Nginx ###\n\n1. Copy the `upstart` and `nginx` conf to the appropriate directories, and make a symlink for nginx:\n\n    ```bash\n    cp /var/www/apps/mechatronics-backend/conf/upstart-mechatronics.com /etc/init/mechatronics.conf\n    cp /var/www/apps/mechatronics-backend/conf/nginx-mechatronics.conf /etc/nginx/sites-available/mechatronics.conf\n    ln /etc/nginx/sites-available/api.mechatronics.conf /etc/nginx/sites-enabled/api.mechatronics.conf\n    ```\n\n2. Restart nginx:\n\n    ```bash\n    service nginx restart\n    start mechatronics\n    ```\n\n-----------------------------\n\n```bash\n# Switch from systemd to upstart\nsudo apt-get install upstart-sysv\nsudo update-initramfs -u\nsudo reboot\n\n# Switch from upstart to systemd\nsudo apt-get install ubuntu-standard systemd-sysv\nsudo update-initramfs -u\nsudo reboot\n```\n\n----------------------------\n\n## Change log\n\n**9 Sept 2018**\n- Changed email address for contact form\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplusk01%2Fmechatronics-backend","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fplusk01%2Fmechatronics-backend","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplusk01%2Fmechatronics-backend/lists"}