A Django-based backend for a Christian dating app designed to help Christians mingle and find companionship. The backend handles user authentication, matchmaking, profile management, discovery of new matches, application settings, and chat functionalities.
- User Authentication (userauth)
- Matchmaking (matches)
- Profile Management (profiles)
- Discovery of New Matches (discover)
- Application Settings Management (appsettings)
- Chat (chatapp)
- Python 3.11.9 or higher
-
Clone the repository:
git clone https://github.com/SamuelMaiko/dating-app.git
-
Navigate to the project directory:
cd dating-app
-
Create a virtual environment and activate it: In Linux
python -m venv env source env/bin/activate
In Windows
python -m venv env env\Scripts\activate
-
Install dependencies:
pip install -r requirements.txt
-
Set up the database:
-
For development purposes, you can use SQLite. Ensure your
settings.py
file has the following configuration commented/uncommented accordingly:# settings.py #Use this for development with SQLite DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': BASE_DIR / 'db.sqlite3', } } #Use this for production with PostgreSQL # DATABASES = { # 'default': { # 'ENGINE': 'django.db.backends.postgresql_psycopg2', # 'NAME': config('DATABASE_NAME'), # 'USER': config('DATABASE_USER'), # 'PASSWORD': config('DATABASE_PASSWORD'), # 'HOST': config('DATABASE_HOST'), # 'PORT': config('DATABASE_PORT', default='5432'), # } # }
- For production purposes, configure the environment variables in your
.env
file:
DATABASE_NAME=your_database_name DATABASE_USER=your_database_user DATABASE_PASSWORD=your_database_password DATABASE_HOST=your_database_host DATABASE_PORT=your_database_port
- For production purposes, configure the environment variables in your
-
-
Create a superuser for admin access:
python manage.py createsuperuser
-
Start the development server:
python manage.py runserver
Before running the project, you need to set up your environment variables. Follow these steps:
-
Copy the example environment variables file to create your own
.env
file:cp .env.example .env
-
Open the
.env
file In VS code:OR
nano .env
-
Fill in your own configuration details. Here’s an explanation of each variable:
# .env DEBUG=True # Set to False in production # Database configuration DATABASE_NAME=your_database_name DATABASE_USER=your_database_user DATABASE_PASSWORD=your_database_password DATABASE_HOST=your_database_host DATABASE_PORT=your_database_port # Email settings EMAIL_BACKEND=your_email_backend EMAIL_HOST=your_email_host EMAIL_PORT=your_email_port EMAIL_USE_TLS=True # or False, depending on your configuration EMAIL_HOST_USER=your_email_user EMAIL_HOST_PASSWORD=your_email_password # Additional settings ALLOWED_HOSTS=localhost,127.0.0.1 # Add your allowed hosts here
- Access the development server at
http://127.0.0.1:8000/
. - Use API endpoints to interact with the portal (e.g., fetch past papers, register for events).
API documentation is available via Swagger. Once the development server is running, access the Swagger documentation at:
- Description: The application is not currently configured to serve images in a production environment.
- Status: Configuration pending
- Workaround: None currently available. Please use a local development setup for image-related features until this is added.
- Description: Real-time messaging is not implemented due to existing bugs that are currently under investigation.
- Status: Investigating and seeking solutions
- Workaround: Users can use alternative communication methods or refresh the chat manually. Real-time messaging will be added once the issues are resolved.
- Description: The application is still using SQLite for the database and has not been connected to a hosted database.
- Status: Migration to a hosted database is planned
- Workaround: For development purposes, SQLite is sufficient. For production, please configure a PostgreSQL database as described in the Installation section.
If you have any questions about the codebase or encounter issues while working on it, feel free to reach out for assistance. Here are some ways to get support:
- Contact: You can reach out to Maiko for assistance or clarification on any aspect of the code.
- Documentation: Refer to the project's documentation for guidance on setup, usage, and troubleshooting.
- Issue Reporting: If you encounter bugs or unexpected behavior, please report them by opening a new issue in the GitHub Issues section of this repository. Provide as much detail as possible, including steps to reproduce the issue, your environment, and any relevant logs or screenshots.
We're here to help ensure a smooth experience with the codebase and to address any questions or concerns you may have.
This project is licensed under the MIT License - see the LICENSE file for details.
Created by Maiko - feel free to contact me!