All Projects → sdslabs → studyportal-nexus

sdslabs / studyportal-nexus

Licence: other
Backend API for studyportal

Programming Languages

python
139335 projects - #7 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to studyportal-nexus

BrewCenterAPI
An open source api for managing homebrewing related data.
Stars: ✭ 30 (+25%)
Mutual labels:  django-rest-framework
grpc-django-book-service
gRPC implementation integrated with Django Application.
Stars: ✭ 28 (+16.67%)
Mutual labels:  django-rest-framework
drf-angular-docker-tutorial
Dockerized Django Back-end API using DRF with Angular Front-end Tutorial
Stars: ✭ 53 (+120.83%)
Mutual labels:  django-rest-framework
My Dashboard
A dashboard powered by Django, showing a notepad, scraping news articles and finance data with dash.py
Stars: ✭ 54 (+125%)
Mutual labels:  django-rest-framework
python-wechat-pay
Use Python3, Django, Django-rest-framework to achieve wechat payment. 微信支付、服务器异步通知、订单查询、退款
Stars: ✭ 18 (-25%)
Mutual labels:  django-rest-framework
smart-home
Control house using raspberry pi djago based secure REST api. Made using raspberry pi, arduino, django ,django REST and angular.
Stars: ✭ 30 (+25%)
Mutual labels:  django-rest-framework
recipeyak
🍛 Application to automate the selection of meals and creation of shopping lists.
Stars: ✭ 23 (-4.17%)
Mutual labels:  django-rest-framework
TA-BOT
An open source Telegram bot which can be used as a teaching assistant bot if you are trying to find an easy and secure way to communicate with your students.
Stars: ✭ 20 (-16.67%)
Mutual labels:  django-rest-framework
django-mobile-app
A batteries-included mobile app backend in Django
Stars: ✭ 52 (+116.67%)
Mutual labels:  django-rest-framework
django-flag-app
A pluggable django application that adds the ability for users to flag(or report) your models.
Stars: ✭ 13 (-45.83%)
Mutual labels:  django-rest-framework
matchering-web
🎚️ Self-Hosted LANDR / eMastered Alternative
Stars: ✭ 25 (+4.17%)
Mutual labels:  django-rest-framework
Bistu
集成了 django-simpleui 作为 admin 管理主题,实现的一个小型的管理系统,并且有的 django-rest-framework 使用示例。此外有个 Bistu-Ant-Design-Pro 项目作为配套的前端使用。如果喜欢记得给个🌟star哦。
Stars: ✭ 51 (+112.5%)
Mutual labels:  django-rest-framework
devops
基于python2.7.10+django1.11.6实现堡垒机,cmdb及批量任务功能
Stars: ✭ 23 (-4.17%)
Mutual labels:  django-rest-framework
ecommerce api
E-commerce by Django Rest Framework
Stars: ✭ 156 (+550%)
Mutual labels:  django-rest-framework
token-authentication-django
This is django app used to explain the tutorial present on https://medium.com/@shubhambansal_89125/token-based-authentication-for-django-rest-framework-44586a9a56fb
Stars: ✭ 27 (+12.5%)
Mutual labels:  django-rest-framework
django-rest-framework-files
File download and upload support for Django REST framework
Stars: ✭ 29 (+20.83%)
Mutual labels:  django-rest-framework
django-test-addons
Testing support for different database system like Mongo, Redis, Neo4j, Memcache, Django Rest Framework for django
Stars: ✭ 20 (-16.67%)
Mutual labels:  django-rest-framework
drf-jwt-example
Code samples of the tutorial "How to Use JWT Authentication with Django REST Framework"
Stars: ✭ 31 (+29.17%)
Mutual labels:  django-rest-framework
core
Backend server API handling user mgmt, database, storage and real-time component
Stars: ✭ 485 (+1920.83%)
Mutual labels:  backend-api
django-code-generator
Generate code from your Django models for faster development
Stars: ✭ 35 (+45.83%)
Mutual labels:  django-rest-framework

Study Portal

About

This is the backend API repository for Study Portal intended to be used by Study Portal React Web App and the mobile app.

Prerequisites

  1. Install PostgreSQL service.
  2. Obtain a credentials.json from the author/generate one yourself and place it in studyportal/drive.
  3. Create a .env file from .env.sample and change the fields as appropriate.

Optional Prerequisites:

These are required to get the auth running for development setup.

  1. Setup Arceus and Falcon locally or get a remote instance for development/testing.
  2. Register study as an app in Arceus and make changes to .env.

If you want to skip these steps you can just add a cookie in the browser with the following description:

key: token,
value: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VybmFtZSI6ImRhcmtyaWRlciIsImVtYWlsIjoiZGFya3JpZGVyMjUxMDk5QGdtYWlsLmNvbSJ9.xBwh-abNBZTlxWDRjEs33DN2AjXlf21JkSwlez6dvGM

Setup Instructions

Ensure that you have installed Docker (with Docker Compose ) and that the Docker daemon is running.

  1. Clone the repository
git clone [email protected]:sdslabs/studyportal-nexus.git
  1. Setup and start docker containers
docker-compose -f docker-compose-dev.yml up

After executing docker-compose -f docker-compose-dev.yml up, you will be running:

  • A Django API server
  • PostgreSQL instance(serves as the application database)
  • Elasticsearch instance
  • Redis server

Once everything has initialized, with docker-compose still running in the background, load the sample data. You will need to install PostgreSQL client tools to perform this step. On Debian, the package is called postgresql-client-common.

./ingest.sh

You are now ready to start sending the API server requests. Hit the API with a request to make sure it is working: curl localhost:8005/api/v1/departments

Diagnosing local Elasticsearch issues

If the API server container failed to start, there's a good chance that Elasticsearch failed to start on your machine. Ensure that you have allocated enough memory to Docker applications, otherwise the container will instantly exit with an error. Also, if the logs mention "insufficient max map count", increase the number of open files allowed on your system. For most Linux machines, you can fix this by adding the following line to /etc/sysctl.conf:

vm.max_map_count = 262144

To make this setting take effect, run:

sudo sysctl -p

Alternate Setup Instructions

You can setup the local dev in a virtualenv:

  1. Create a virtualenv using your preferred method.
  • Using virtualenv
virtualenv -p python3 venv
source venv/bin/activate
  • Using virtualenvwrapper
mkvirtualenv studyportal
workon studyportal
  1. Install packages in virtual environment.
pip install -r requirements.txt
  1. Edit the .env file.
DATABASE_HOST=localhost
ELASTICSEARCH_HOST=localhost
REDIS_HOST=localhost
  1. Initialize the database and create elasticsearch index
python manage.py makemigrations
python manage.py migrate
python manage.py search_index --rebuild -f
  1. Create Django admin user
python manage.py createsuperuser
  1. Run development server
python manage.py runserver 0.0.0.0:8005
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].