- Users
- Signup
- Auth
- Create, read, update user's information
- Password Change
- Links
- Create, Read, Update, Delete Shortened URL
- Custom short codes for shortened URLs
- A public API that redirects to a long URL using a short code.
- Send each URL visit to Analytical DB (It will be the same DB for simplicity, data will be sent in asynchronous way using RabbitMQ to have a low latency)
- QR codes
- CRUD for the QR code entity
- QR Code customization
- Background color change
- Dots color change
- Dots pattern customization
- Corners pattern customization
- Ability to add a logo
- Download a QR code in different formats
- PNG
- JPEG
- SVG
- WEBP
- Analytics
- Top performing Date ( The date when the user's urls had the most clicks and scans )
- Clicks + scans by device
- Clicks + scans over time
- Top-Performing Location (The location with the highest number of scans)
- Clicks + scans by location
https://github.com/GhostMEn20034/short-ly-frontend
Note that the setup assumes you are using any Linux distribution
git clone https://github.com/GhostMEn20034/short-ly.gitchmod +x init-database.shtouch .envDB_CONNECTION_STRING=postgresql+asyncpg://<SQL_USER>:<SQL_PASSWORD>@db:5432/<SQL_DATABASE>
DB_LOG_QUERIES=false | true
SQL_USER=your_db_user
SQL_PASSWORD=your_db_password
SQL_DATABASE=your_database_name
SUPER_USER_PWD=your_postgres_user_password
JWT_SECRET_KEY=your_jwt_secret key # Secret key required for signing JWT Tokens, you can generate it on https://jwtsecret.com/generate
REDIS_HOST=redis # If you use docker compose to run the app, then the specified value must be "redis"
REDIS_PASSWORD=your_redis_pwd # if you use docker compose, it's not necessary to include the variable into this file
REDIS_PORT=your_redis_port # It’s not necessary to include the value if the port of your redis db is 6379docker compose up -d --build3. Go to localhost:8000
touch .env.testDB_CONNECTION_STRING=postgresql+asyncpg://<SQL_USER>:<SQL_PASSWORD>@db:5432/<SQL_DATABASE>
DB_LOG_QUERIES=false | true
SQL_USER=your_db_user
SQL_PASSWORD=your_db_password
SQL_DATABASE=your_database_name
SUPER_USER_PWD=your_postgres_user_password
JWT_SECRET_KEY=your_jwt_secret key # Secret key required for signing JWT Tokens, you can generate it on https://jwtsecret.com/generate
REDIS_HOST=redis # If you use docker compose to run the app, then the specified value must be "redis"
REDIS_PASSWORD=your_redis_pwd # if you use docker compose, it's not necessary to include the variable into this file
REDIS_PORT=your_redis_port # It’s not necessary to include the value if the port of your redis db is 6379docker-compose -f docker-compose-test.yml --env-file .env.test up --build
docker exec -it fastapi_url_fold_test shpytest -v --tb=short --disable-warnings ./tests/integration/7. After the tests' execution, switch back to the first session and click Ctrl + C to stop containers
Note:
- To run unit tests you don't need docker containers
- You can just create a virtual environment using venv or conda for example
If you want to run unit tests in virtual environment, you also need to install all dependencies using command:
pip install -r requirements.txtpytest -v --tb=short --disable-warnings ./tests/unit/