Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alextkdev/store-server-django
This project is a Django-based study project aimed at developing a server for a store application. It includes features such as product management, user authentication, and background task processing.
https://github.com/alextkdev/store-server-django
django django-application django-project django-rest-framework store
Last synced: about 1 month ago
JSON representation
This project is a Django-based study project aimed at developing a server for a store application. It includes features such as product management, user authentication, and background task processing.
- Host: GitHub
- URL: https://github.com/alextkdev/store-server-django
- Owner: AlexTkDev
- License: mit
- Created: 2024-08-03T13:38:30.000Z (3 months ago)
- Default Branch: master
- Last Pushed: 2024-08-19T10:30:06.000Z (3 months ago)
- Last Synced: 2024-10-11T07:05:28.790Z (about 1 month ago)
- Topics: django, django-application, django-project, django-rest-framework, store
- Language: JavaScript
- Homepage:
- Size: 1.93 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Store Server
This project is a Django-based study project aimed at developing a server for a store application. It includes features such as product management, user authentication, and background task processing.
## Stack
- [Python](https://www.python.org/downloads/): Programming language used for the project.
- [Django](https://www.djangoproject.com/): Web framework for building the server-side application.
- [PostgreSQL](https://www.postgresql.org/): Relational database management system used for data storage.
- [Redis](https://redis.io/): In-memory data structure store used for caching and task queue.## Features
- **User Authentication**: Secure user login and registration.
- **Product Management**: CRUD operations for products.
- **Background Tasks**: Asynchronous task processing with Celery.
- **Caching**: Efficient data retrieval with Redis caching.## Local Development
To set up the project locally, follow these steps:
### 1. Set Up Virtual Environment
Create and activate a virtual environment to manage project dependencies:
```bash
python -m venv .venv
source .venv/bin/activate
```### 2. Install Dependencies
Upgrade `pip` and install the required packages:
```bash
pip install --upgrade pip
pip install -r requirements.txt
```### 3. Database Setup
Run migrations to set up the database schema:
```bash
./manage.py migrate
```Load initial data into the database (replace `` with the path to your fixture files):
```bash
./manage.py loaddata
```Start the Django development server:
```bash
./manage.py runserver
```### 4. Run Redis Server
Start the Redis server for caching and background task management:
```bash
redis-server
```### 5. Run Celery Worker
Start the Celery worker for processing background tasks:
```bash
celery -A store worker --loglevel=INFO
```## Configuration
### Settings
The configuration of the project is located in `store/settings.py`. Here you can adjust database settings, secret keys, and other project-specific configurations.
### Environment Variables
Ensure the following environment variables are set:
- `DATABASE_URL`: URL for PostgreSQL database connection.
- `REDIS_URL`: URL for Redis server connection.
- `SECRET_KEY`: Django secret key for cryptographic operations.### Fixtures
Fixture files are located in the `store/fixtures/` directory. These files are used to load initial data into the database.
## Testing
To run tests, use the following command:
```bash
./manage.py test
```Ensure all tests pass before deploying changes.
## Deployment
For deploying the project to a production environment, follow the deployment instructions in the `DEPLOYMENT.md` file.
## Contributing
Contributions are welcome! Please follow the standard pull request workflow:
1. Fork the repository.
2. Create a new branch for your changes.
3. Commit your changes with descriptive messages.
4. Push your branch to your forked repository.
5. Create a pull request to merge your changes into the main repository.## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
---
Feel free to adjust or expand upon these sections based on the specifics of your project and any additional details you want to include.