Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

Akfamakon

Full-stack codebase for akfamakon.uz. The backend is an Express + MongoDB API that also serves the compiled UI, while the frontend is a Vite + React SPA that renders marketing pages, product listings, and admin placeholders.

Repo layout

backend/  REST API, JWT auth, Mongo models, AWS S3 uploads, SSR host
frontend/ Vite + React + Tailwind storefront and admin shell

Backend at a glance

  • Node.js/Express server defined in backend/server.js; exposes namespaced routes for auth, files, content modules (partners, services, products, news, sliders, banners, portfolios, receptions), site settings, visitor statistics, and visit logs.
  • MongoDB models under backend/models/ capture multi-language content, price ranges, and media relations.
  • Authentication uses bcrypt-hashed credentials plus custom JWT middleware (middleware/auth.middleware.js).
  • File uploads stream directly to AWS S3 via multer-s3; FileController.DeleteMany keeps S3 keys and Mongo File docs in sync.
  • Production mode serves the built frontend bundle from backend/dist.

Frontend at a glance

  • Vite + React + TypeScript app (frontend/) styled with Tailwind and utility CSS.
  • Routing handled through react-router-dom with lazy-loaded sections: Home, Products, News, Contact, and an /admin shell.
  • UI composed from components/ (Header, Footer, Layout) and pages/Home/components/* for hero banners, stats, partner slider, and contact CTA blocks.
  • Animations via react-animate-on-scroll, deferred images via react-lazy-load-image-component, and masked inputs via @react-input/mask.

Local development

Backend

cd backend
cp .env.example .env   # create this file; see variables below
npm install
npm start              # starts on PORT (default 3000)

Frontend

cd frontend
npm install
npm run dev            # Vite dev server on port 5173 by default
npm run build          # outputs dist/ you can copy into backend/dist for SSR

Required environment (backend)

PORT=3000
DB_URI=mongodb+srv://...
SECRET=super-secret-jwt
S3_ACCESS_KEY_ID=...
S3_SECRET_ACCESS_KEY=...
S3_BUCKET_REGION=eu-central-1
S3_BUCKET_NAME=akfamakon-assets

Deployment flow

  1. npm run build in frontend/ and copy the generated dist/ into backend/dist/.
  2. Provide the .env values above on the server (Node 18+ recommended).
  3. npm install --production inside backend/ and run npm start (or wrap with a process manager).

For route-by-route backend details, see backend/README.md.

About

Akfamakon - is a mern stack project that made for AKFAMAKON company that built in 2024. Codes are opensource.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages