LIVE APP: https://currency-xchangeapp.herokuapp.com/
This is a simple Django app that integrates with OpenExchangeRates to facilitate currency conversion and trasnfer of funds from wallet to wallet.
URL: https://currency-xchangeapp.herokuapp.com/admin
- Initial Creation of Wallets after user has registered
- Overall access to all Models via Django admin
- User Signup/Login (only requires username/password)
- User able to set/update default currency and profile pic for each wallet
- User can transfer cash to other registered users in any OpenExchangeRates supported currency from UI
This application has been developed and tested with the following technologies
- Python 3.9.5
- Django 3.2
- Postgresql 12
- Redis - used as Celery Broker
- Pipenv
- Ensure all the listed dependencies are installed
- Clone this repository
$ git clone [email protected]:thoth-ky/currency_exhange_app.git
- Create a database on Postgresql called
currency_exchange_app
, if a different name is used then ensure to provide it in .env - Acquire a
OPEN_EXCHANGE_RATES_APP_ID
from OpenExchangeRates - Create a .env file from .env.example file provided and replace each value with the correct value
- Run the following commands to setup the pipenv environemnt
$ python -m pipenv shell $ pipenv install
- Run database migrations
$ python manage.py migrate
- Update exchange rates
$ python manage.py update_rates
- Start the Celery Beat and Workers, this runs automated updates at Midnight daily, the schedule is configured using a crontab in
currency_exchange_app/celery.py
$ supervisord -c supervisord.conf $ supervisorctl -c supervisord.conf start all
- To confirm everything is setup correctly, run tests
$ pytest
- Create initial admin user
$ python manage.py createsuperuser
- Start the server and access it on
http://localhost:8000
$ python manage.py runserver
- Signup as a user
- Login as an administrator on the admin site using credentials for superuser
- Proceed to create wallets for created users with an initial balance
- As a user from the wallets page, select a single wallet
- Select to update wallet details or perform trasnfer of funds
- Submit the necessary details using the forms
- Transactions TO/FROM the page are recorded in the wallets page
- Joseph Mutuku Kyalo