A CRM based on DRF and React.
Basically, it's high time Alex learned a JS framework and modern testing/deployment strategies. Down the road, we might add goodies like GraphQL and Docker, but let's stick to the basics for now.
- Add form (modal?)
- Router (react-router)
- Switching between Organization and Contact pages should update URL
- Factories, tests (factory-boy/Cypress)
- Dockerize?
- Push to Heroku/AWS
- Auth (JWT?)
- Caching (Redis?)
- State management (Redux?)
- CI integration (Travis? Heroku CI?)
- Backend
- Heroku (?)
- Docker (?)
- Postgres 10.3
- Redis (?)
- Django 2.1
- django-rest-framework 3.8
- Frontend
- Redux (?)
- React 16.3
- Bootstrap 4.1
- SCSS
- Tests
- Django
- Cypress (?)
cd server
- Install the pipenv package manager
pip3 install pipenv
- Add pipenv bin folder to (
$HOME/.local/bin
) to$PATH
- Activate pipenv
pipenv shell
- Install Python packages, with optional development packages
pipenv install -d
- Install Postgres if necessary
sudo apt install postgresql postgresql-contrib
- Create Postgres user and database
sudo -u postgres psql
CREATE USER djawn WITH PASSWORD hunter2;
(replacehunter2
if you dare)CREATE DATABASE djawn OWNER djawn;
- Add database credentials to env var
export DATABASE_URL=postgres://djawn:hunter2@localhost:5432/djawn
- Add Django secret key to env var
export SECRET_KEY=hunter2
(or a somewhat more secure password, for you Krebs readers out there)
- Run initial database migration
python manage.py migrate
- Create superuser
python manage.py createsuperuser
- Run server!
python manage.py runserver
- Admin should be accessible at
localhost:8000/admin/
- Django REST Framework endpoints should be accessible at e.g.
localhost:8000/api/organization/
cd client
- Install the version of npm provided by your distribution, if necessary
sudo apt install -y npm
- Upgrade to latest version of npm
sudo npm install -g npm@latest
- Install npm deps
npm i
- Compile and serve client!
npm start
- Website should be accessible at
localhost:3000