Overview
Clother is an Android client-server application for swapping unused clothes written in Python and Kotlin.
Demonstration
Demonstration.mov
Features
- Authentication
- Registration with email confirmation
- Login
- Password recovery
- Paginated list of offers
- Search by text query or category with the following filters: size, location
- Creation of your own offer with up to 5 images, category, title, description, size and location
- Realtime person-to-person chat with push notifications support
- Offers and messages caching
Built with
Getting started
Follow the steps below to run the application.
Prerequisites
- Install Docker
- Obtain Google Maps API key as described here
- Create Firebase Cloud Messaging project as described here and obtain API key
Installation
- Clone the repository and navigate to
Backend
directory - Create
instance
folder andconfig.py
file inside this folder. This folder should be added to.gitignore
because it will contain your sensitive data - Open
config.py
file and specify the following parameters:SECRET_KEY
,JWT_SECRET_KEY
,MAIL_SERVER
,MAIL_PORT
,MAIL_USERNAME
,MAIL_PASSWORD
,MAIL_DEFAULT_SENDER
,MAIL_USE_TLS
,MAIL_USE_SSL
,FCM_API_KEY
(your Firebase Cloud Messaging API key) - Open Docker Desktop and wait for the engine to start
- Navigate back to
Backend
directory, open command line here and executedocker-compose up -d --build
. After containers start, visithttp://localhost:5000/
to check that everything is fine. You should get 404 HTTP error - Execute
docker-compose exec api bash
to openbash
inside the Docker container. Then execute./setup.sh
to create database tables and populate them. If you don't want to populate some tables, just remove the corresponding commands from thesetup.sh
, e.g.,flask admin mock-messages
- Now open
Client
folder as Android Studio project - Add the following line to the global
gradle.properties
file:GOOGLE_MAPS_API_KEY="%YOUR_API_KEY%"
. - If you are going to run this app on your physical device, go to
Client/app/src/main/java/com/t3ddyss/clother/utilities/Constants.kt
and changeBASE_URL_DEVICE
to the IP address of your machine - Register the app with Firebase as described here. You will need to replace
Client/app/google-services.json
with yourgoogle-services.json
file - At this point, you should be able to successfully build, run and use the application
Roadmap
- Implement deep linking for push notifications
- Support images in chat
Migrate to PostgreSQL and add advanced database triggersSupport different timezones
License
Distributed under the MIT License. See LICENSE
for more information.
Contact
Telegram: @t3ddys
Github repository: https://github.com/t3ddyss/Clother