Giter VIP home page Giter VIP logo

donotexpire's Introduction

DoNotExpire

Python Django HTML CSS JavaScript

DoNotExpire is a website that makes keeping your Diablo 2 accounts safe from expiring much easier.

Built with Django framework, HTML, CSS, vanilla Javascript and a bit of JQuery.

Overview:

Multiplayer Diablo II characters expire if they are inactive for too long. Expired characters cannot be recovered. Single Player characters do not expire.

Newly created characters will expire after 10 days of inactivity. Characters played for two hours or more will expire after 90 days of inactivity. To reset the inactivity timer on a character, you need to log in to an active game with that character and buy or sell an item, or kill a monster.

Diablo II accounts are also deleted after 90 days of inactivity.

Thanks to DoNotExpire you can keep track of all your accounts. Log in and add your accounts, which hold up to 16 characters, to the database.
Whenever you log into your Diablo 2 account, open the website and press the button next to the character you have just ' permed' ingame. The expiration date for this character will refresh on the website and you will be able to manually follow those dates.
Should you not perm your character and update the info on website, you will be sent an email with a notification to do so.

If you keep forgetting to sync your Diablo 2 accounts state with website data, create a simple script to open both your browser with this website and Diablo 2 game instance at the same time. This way you will most likely remember to update the dates.

Development Setup

Without Docker

Create .env file with the following content:

SECRET_KEY=your_secret_key

Create virtual environment, activate it and install requirements with pipenv

mkdir .venv

pipenv shell

pipenv install

or with virtualenv

py -3 -m venv venv

venv\Scripts\Activate

pip install -r requirements.txt

Run migrations

python manage.py makemigrations

python manage.py migrate

Create superuser

python manage.py createsuperuser

Run server

python manage.py runserver

Run unit tests and get code coverage

coverage run manage.py test

coverage report -m

With Docker

Create .env file with the following content:

DJANGO_SETTINGS_MODULE=core.settings.dev

SECRET_KEY=...

DB_NAME=postgres
DB_USER=postgres
DB_PASSWORD=postgres

POSTGRES_DB=${DB_NAME}
POSTGRES_USER=${DB_USER}
POSTGRES_PASSWORD=${DB_PASSWORD}

Make sure Docker Engine is running.

While in root directory, build docker images and run them with docker-compose. This might take up to few minutes. Rebuilding image is crucial after installing new packages via pipenv.

Bringing up containers (with optional --build flag to rebuild images)

docker compose up --build

Bringing down containers with optional -v flag removes all attached volumes and invalidates caches.

docker compose down

Run commands inside docker, e.g.:

docker exec -it backend python manage.py makemigrations

docker exec -it backend python manage.py migrate

docker exec -it backend python manage.py createsuperuser

Application will be up at 127.0.0.1:8000.

Deployment to Railway

Go to https://railway.app/dashboard and create a new blank project.

Add Postgres database service.

Add backend service deployed from GitHub Repo.

Set environment variables in backend service:

RAILWAY_DOCKERFILE_PATH=Dockerfile.prod
PORT=8000
SECRET_KEY=...
PRODUCTION_HOST=<app_name>.up.railway.app
DJANGO_SETTINGS_MODULE=core.settings.prod
DATABASE_URL=${{<postgres_service_name>.DATABASE_URL}}

Add start command in deploy section:

gunicorn core.wsgi:application --bind 0.0.0.0:8000

Deployment to Heroku (Deprecated)

Set env variables in dashboard settings or with CLI

SECRET_KEY=...
PRODUCTION_HOST=<app_name>.herokuapp.com
DJANGO_SETTINGS_MODULE=core.settings.prod

donotexpire's People

Contributors

alschn avatar

Watchers

 avatar  avatar

donotexpire's Issues

To Do - must have features

  • maybe email notifications (started doing it, need to setup a separate gmail account + notification system)
    +- create new account UI
    +- better login/register views + UI

Issues to fix:

Fixed issues

  • character's name can contain numbers (that shouldn't be the case - validator doesn't work properly)
  • if you click on character different than Assassin or Druid and you don't check Expansion, then the Assassin or Druid can be created without Expansion even though it's visible as marked.
  • expiration time
  • fix responsiveness - now it should be decent unless device is super small

Later:

  • maybe profile pages for each registered user, so that they can view statistics like: added accounts, expiring characters and so on
  • maybe password recovery

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.