# luffycity **Repository Path**: viewshadow/luffycity ## Basic Information - **Project Name**: luffycity - **Description**: 仿路飞学城,一个B2C在线教育商城。 (防水墙验证码、短信验证码 未实现) (oss存储 未实现) - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 2 - **Forks**: 0 - **Created**: 2024-07-22 - **Last Updated**: 2025-05-04 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 路飞学城 #### 介绍 本项目使用前后端分离的方式,编写在线教育平台《路飞学城》。可实现用户注册登录、浏览购买课程等功能服务。 #### 软件架构 前端:vite + vue3 + element-plus 后端:django rest framework + mysql + redis + elasticsearch #### 使用说明 部署后可以使用浏览器进行访问。 #### 代码结构 ``` . ├── Readme.md ├── assets ├── luffycityapi │   ├── demo │   │   └── jwtdemo.py │   ├── logs │   │   └── luffycity.log │   ├── luffycityapi │   │   ├── __init__.py │   │   ├── apps │   │   │   ├── cart │   │   │   │   ├── __init__.py │   │   │   │   ├── admin.py │   │   │   │   ├── apps.py │   │   │   │   ├── migrations │   │   │   │   ├── models.py │   │   │   │   ├── tests.py │   │   │   │   ├── urls.py │   │   │   │   └── views.py │   │   │   ├── coupon │   │   │   │   ├── __init__.py │   │   │   │   ├── admin.py │   │   │   │   ├── apps.py │   │   │   │   ├── migrations │   │   │   │   ├── models.py │   │   │   │   ├── services.py │   │   │   │   ├── tests.py │   │   │   │   ├── urls.py │   │   │   │   └── views.py │   │   │   ├── courses │   │   │   │   ├── __init__.py │   │   │   │   ├── admin.py │   │   │   │   ├── apps.py │   │   │   │   ├── management │   │   │   │   │   ├── __init__.py │   │   │   │   │   └── commands │   │   │   │   │   ├── __init__.py │   │   │   │   │   └── example.py │   │   │   │   ├── migrations │   │   │   │   ├── models.py │   │   │   │   ├── paginations.py │   │   │   │   ├── search_indexes.py │   │   │   │   ├── serializers.py │   │   │   │   ├── tests.py │   │   │   │   ├── urls.py │   │   │   │   └── views.py │   │   │   ├── home │   │   │   │   ├── __init__.py │   │   │   │   ├── admin.py │   │   │   │   ├── apps.py │   │   │   │   ├── migrations │   │   │   │   ├── models.py │   │   │   │   ├── serializers.py │   │   │   │   ├── tests.py │   │   │   │   ├── urls.py │   │   │   │   └── views.py │   │   │   ├── orders │   │   │   │   ├── __init__.py │   │   │   │   ├── admin.py │   │   │   │   ├── apps.py │   │   │   │   ├── migrations │   │   │   │   ├── models.py │   │   │   │   ├── paginations.py │   │   │   │   ├── serializers.py │   │   │   │   ├── tasks.py │   │   │   │   ├── tests.py │   │   │   │   ├── urls.py │   │   │   │   └── views.py │   │   │   ├── payments │   │   │   │   ├── __init__.py │   │   │   │   ├── admin.py │   │   │   │   ├── apps.py │   │   │   │   ├── keys │   │   │   │   │   ├── alipay_public_key.pem │   │   │   │   │   └── app_private_key.pem │   │   │   │   ├── migrations │   │   │   │   ├── models.py │   │   │   │   ├── tests.py │   │   │   │   ├── urls.py │   │   │   │   └── views.py │   │   │   └── users │   │   │   ├── __init__.py │   │   │   ├── admin.py │   │   │   ├── apps.py │   │   │   ├── migrations │   │   │   ├── models.py │   │   │   ├── serializers.py │   │   │   ├── tests.py │   │   │   ├── urls.py │   │   │   └── views.py │   │   ├── asgi.py │   │   ├── db_router.py │   │   ├── libs │   │   │   └── polyv.py │   │   ├── settings │   │   │   ├── __init__.py │   │   │   ├── dev.py │   │   │   └── pro.py │   │   ├── static │   │   │   └── 1.jpg │   │   ├── templates │   │   │   └── search │   │   │   └── indexes │   │   │   └── courses │   │   │   └── course_text.txt │   │   ├── uploads │   │   │   ├── 2.jpg │   │   │   └── teacher │   │   ├── urls.py │   │   ├── utils │   │   │   ├── __init__.py │   │   │   ├── alipaysdk.py │   │   │   ├── authenticate.py │   │   │   ├── constants.py │   │   │   ├── exceptions.py │   │   │   ├── models.py │   │   │   ├── serializers.py │   │   │   └── views.py │   │   └── wsgi.py │   ├── manage.py │   ├── requirements.txt │   ├── scripts │   │   ├── create_data.sh │   │   ├── luffycity_celery_beat.ini │   │   ├── luffycity_celery_flower.ini │   │   ├── luffycity_celery_worker.ini │   │   ├── supervisor.service │   │   ├── supervisord.conf │   │   └── test_data.sql │   └── uwsgi.ini └── luffycityweb ├── README.md ├── index.html ├── package.json ├── public │   └── vite.svg ├── src │   ├── App.vue │   ├── api │   │   ├── banner.js │   │   ├── cart.js │   │   ├── course.js │   │   ├── nav.js │   │   ├── order.js │   │   └── user.js │   ├── assets │   │   └── 1.jpg │   ├── components │   │   ├── Banner.vue │   │   ├── Footer.vue │   │   ├── Header.vue │   │   ├── Login.vue │   │   └── user │   │   ├── Course.vue │   │   ├── Info.vue │   │   └── Order.vue │   ├── main.js │   ├── router │   │   └── index.js │   ├── settings.js │   ├── store │   │   └── index.js │   ├── style.css │   ├── utils │   │   ├── func.js │   │   ├── http.js │   │   └── player.js │   └── views │   ├── AliPaySuccess.vue │   ├── Cart.vue │   ├── Course.vue │   ├── Home.vue │   ├── Info.vue │   ├── Login.vue │   ├── Order.vue │   ├── Register.vue │   ├── Study.vue │   └── User.vue ├── vite.config.js └── yarn.lock ``` #### 服务器部署步骤 1. 准备一台服务器,安装docker、docker-compose等软件和依赖。本项目使用docker镜像进行部署。 2. 编排nginx容器,使用nginx提供前端web服务,实现反向代理、负载均衡等功能。 3. 编排mysql、redis、elasticsearch容器,编排uwsgi启动的服务端项目容器,使用uwsgi运行服务端程序,提供后端web服务。 4. 下载代码,适配线上配置。 5. 使用docker-compose启动各容器服务。 #### 实现功能 1. 首页 ![image-20240819173719206](./assets/image-20240819173719206.png) 2. 登录注册 ![image-20240819173600983](./assets/image-20240819173600983.png) ![image-20240819173650021](./assets/image-20240819173650021.png) 3. 课程列表 ![image-20240819173752621](./assets/image-20240819173752621.png) 4. 课程详情 ![image-20240819173838971](./assets/image-20240819173838971.png) 5. 购物车 ![image-20240819173928420](./assets/image-20240819173928420.png) 6. 商品结算 ![image-20240819174019593](./assets/image-20240819174019593.png) 7. 购买支付 ![image-20240819174225789](./assets/image-20240819174225789.png) 8. 个人中心 ![image-20240819174313702](./assets/image-20240819174313702.png) 9. 后台管理页面 ![image-20240819171915733](./assets/image-20240819171915733.png) #### 接口列表 ``` admin/ uploads/(?P.*) home/ users/ courses/ ckeditor/ cart/ orders/ coupon/ payments/ ``` ![image-20240819174559653](./assets/image-20240819174559653.png)