DESCRIPTION : This is a project in my Web Application Development Project (01076120), Computer Engineering at KMITL Class. This project about food delivery web application that user can order food that call fark and user can buy food for other user. At the first login user will get 3 coins, Your coin will decrease when you order food depend on your order and your coin will increase when you buy the food for other user depend on order amount. The other features is edit profile and coin history.
- Frontend React Typescript (Created by Vite) with Tailwindcss
- Backend ASP.NET Core 6.0
- Database MySQL
npm install --global yarn
git clone https://github.com/Bourbxn/fark-t.git
- Login to MySQL tools
- Create schema in MySQL tools name
farkt
- Open and edit file
ApplicationDbContext.cs
infark-t/server/ApplicationDbContext.cs
using Microsoft.EntityFrameworkCore;
using server.Models;
namespace server;
public class ApplicationDbContext : DbContext
{
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
optionsBuilder.UseMySQL("Host=localhost;Port=<MySQL-Port>;Database=farkt;User ID=<MySQL-Username>;Password=<MySQL-Password>");
}
public DbSet<Users> Users { get; set; }
public DbSet<Orders> Orders { get; set; }
public DbSet<Farks> Farks { get; set; }
public DbSet<Histories> Histories { get; set; }
}
- Migrate Database
cd server
dotnet ef migrations add <migration-comment>
dotnet ef database update
- Install package
cd client
yarn
- Open and edit file
.env
infark-t/client/.env
VITE_APP_API=<backend-url>/api
cd server
dotnet run
cd client
yarn dev