New version of Nest Application
Nest is a web-based platform built using Django that integrates real-time features using Django Channels and Redis. This project showcases the use of neomorphic design for the user interface and handles asynchronous events like WebSocket connections for real-time messaging.
- User profile management with edit functionality
- Real-time messaging powered by Django Channels
- Redis-based message broker for asynchronous events
- Neomorphic UI design
- User authentication and profile system
- Join request handling for various "nests" (groups)
- Backend: Django 4.x
- Frontend: HTML, CSS (Neomorphic design)
- Database: PostgreSQL (can be replaced with other databases)
- Real-Time Communication: Django Channels, WebSockets
- Message Broker: Redis
- Environment Management: Python Virtual Environment (
venv
)
git clone https://github.com/Kimforee/Nest-0.1.git
cd Nest-0.1
Make sure Python is installed on your system. Then, set up a virtual environment:
python -m venv venv
Activate the virtual environment:
- On Windows:
venv\Scripts\activate
- On macOS/Linux:
source venv/bin/activate
After activating the virtual environment, install the required dependencies:
pip install -r requirements.txt
Make sure Redis is installed and running on your system. For example, you can install Redis via:
- macOS (using Homebrew):
brew install redis
- Ubuntu:
sudo apt-get install redis-server
- Windows: Use Redis for Windows or use Docker to run Redis.
Start the Redis server:
redis-server
In settings.py
, make sure you have configured Redis for Channels:
# settings.py
ASGI_APPLICATION = 'your_project_name.routing.application'
# Redis Channel Layer
CHANNEL_LAYERS = {
'default': {
'BACKEND': 'channels_redis.core.RedisChannelLayer',
'CONFIG': {
"hosts": [('127.0.0.1', 6379)], # Redis running locally
},
},
}
Run the following command to apply migrations:
python manage.py migrate
You can now run the Django development server:
python manage.py runserver
In a new terminal (with the virtual environment activated), start the Channels worker:
python manage.py runworker
Start the Redis server to handle WebSocket connections:
redis-server
- Access the application at
http://127.0.0.1:8000
. - Real-time functionality (such as messaging) will work through Django Channels and Redis.
To run the unit tests (unit testing not yet initaited):
python manage.py test
This project incorporates neomorphic design for user profile interfaces. Neomorphism combines minimalism with soft shadows and highlights to create depth. You can find the neomorphic UI in the profile pages and buttons across the application.
This project uses Django Channels and Redis for handling real-time WebSocket communication. Redis acts as the message broker, allowing Channels to handle asynchronous messages and real-time events.
- Django Channels: Extends Django’s built-in capabilities to handle WebSocket connections and other asynchronous protocols.
- Redis: Serves as the message broker for Django Channels, ensuring efficient communication between server and client.
Feel free to submit pull requests or raise issues. All contributions are welcome.
- Fork the repository
- Create your feature branch (
git checkout -b feature/feature-name
) - Commit your changes (
git commit -m 'Add some feature'
) - Push to the branch (
git push origin feature/feature-name
) - Open a pull request
This project is licensed under the MIT License.
### Explanation:
- **Project setup**: Guides users on how to install and run the project locally using `venv`, Redis, and Django Channels.
- **Real-time features**: Highlights the integration of Redis and Django Channels for WebSocket handling.
- **File structure**: Provides an overview of the core directories and files.
- **Neomorphic design**: Describes the user interface design used in the project.
Feel free to adjust the content to match the specifics of your project.