A Modern Platform for Discovering, Creating, and Trading Digital Art & NFTs
ArtNFT Marketplace is a cutting-edge, full-stack platform designed for artists, collectors, and enthusiasts in the burgeoning world of Non-Fungible Tokens (NFTs). It offers a seamless and engaging experience across web and mobile for discovering unique digital artworks, creating and listing NFTs, and interacting with a vibrant community. This project is structured as a monorepo to manage multiple applications and shared packages efficiently.
- β¨ Key Features
- ποΈ Project Architecture
- π Current Project Structure
- π οΈ Tech Stack
- π Getting Started
- π¨ Styling & Theming
- π€ AI Integration (Genkit)
- π± Mobile Application (React Native)
- π API Layer (REST & GraphQL)
- π Building for Production
- βοΈ Deployment
- π€ Contributing
- πΊοΈ Roadmap
- π License
- π Contact
(Key features remain largely the same but apply to web and conceptually mobile where relevant. The backend supports these frontends.)
User Authentication (Across Platforms):
* Secure sign-up and login for web users, handled by the central API. * Admin login via the API. * Simulated wallet connection UI.Dynamic Dashboards (Web & Mobile Home):
* Responsive layouts for web (`apps/web/src/app`) and native experience for mobile (`apps/mobile`). * Personalized content feeds, artist spotlights, category exploration.Advanced NFT Creation & Listing (Web, with AI):
* User-friendly interface for minting NFTs with AI-powered content assistance (Genkit within Next.js, primarily in `apps/web/src/ai`).Comprehensive NFT & User Discovery:
* Detailed NFT pages, robust search with filtering, category pages, user profiles accessible via web and mobile.Robust Admin Panel (`apps/web/src/app/admin`):
* Secure admin login, user/NFT management, category control, promotions, analytics, audit logs, content moderation, site settings.ArtNFT Marketplace is architected as a monorepo to manage its multiple applications and shared libraries efficiently. This approach enhances code sharing, simplifies dependency management, and streamlines the development workflow.
The core components are:
-
Applications (
apps/
):- Web App (
apps/web
): A Next.js application serving the main user-facing marketplace and the admin panel. It handles user authentication, NFT discovery, creation (with Genkit AI), and user profiles. The source code is primarily inapps/web/src/
, with pages and routes inapps/web/src/app/
. - Mobile App (
apps/mobile
): A React Native application (placeholder) providing a native experience for iOS and Android users. - API Service (
apps/api
): A Node.js (Express.js) backend providing RESTful APIs (GraphQL planned). It handles business logic, database interactions (MySQL/MariaDB via Sequelize), authentication (JWT), and serves data to all frontend applications. Source code is inapps/api/src/
.
- Web App (
-
Shared Packages (
packages/
):ui/
: Reusable React UI components (e.g.,AppLayout
,ArtNFTLogo
,GlobalHeader
) built with ShadCN UI, shared primarily byapps/web
. Source:packages/ui/src/
.mobile-ui/
: (Placeholder) Reusable React Native UI components forapps/mobile
.utils/
: Common utility functions (likecn
for classnames) shared across the entire codebase. Source:packages/utils/src/
.types/
: (Placeholder) Centralized TypeScript definitions for API contracts, database models, etc.api-client/
: (Placeholder) A dedicated client library for frontend applications to interact withapps/api
.core-logic/
: (Placeholder) Shared business logic modules.
-
Database (
database/
):- A MySQL/MariaDB relational database.
- Schema is managed via
database/schema.sql
and versioned using database migrations (planned).
-
Communication:
- Client applications (
web
,mobile
) communicate with the centralapps/api
service. - Genkit AI functionalities are integrated within the
apps/web
Next.js server environment (inapps/web/src/ai/
).
- Client applications (
This project utilizes a monorepo structure:
artnft-marketplace/
βββ apps/
β βββ web/ # Next.js Frontend (User & Admin)
β β βββ public/
β β βββ src/
β β β βββ app/ # Next.js App Router (pages, layouts)
β β β β βββ admin/ # Admin panel routes & components
β β β β βββ ... # User-facing routes
β β β βββ components/ # Web-app specific components (NFTCard, etc.)
β β β β βββ ui/ # ShadCN UI components (specific to web app)
β β β βββ lib/ # Web-app specific utils (e.g., utils.ts for cn)
β β β βββ hooks/ # Web-app specific hooks (e.g., use-toast)
β β β βββ ai/ # Genkit AI flows & config
β β βββ components.json # ShadCN config for apps/web
β β βββ next.config.ts
β β βββ package.json
β βββ mobile/ # React Native App (Placeholder)
β β βββ src/
β β βββ package.json
β βββ api/ # Node.js Backend API
β βββ src/ # Backend source (Express, Sequelize, etc.)
β βββ package.json
βββ packages/
β βββ ui/ # Shared React UI components (AppLayout, ArtNFTLogo)
β β βββ src/
β β βββ package.json
β βββ mobile-ui/ # (Placeholder) Shared React Native UI components
β β βββ src/
β β βββ package.json
β βββ utils/ # Shared utility functions (cn utility)
β β βββ src/
β β βββ package.json
β βββ types/ # (Placeholder) Shared TypeScript types
β β βββ package.json
β βββ ... # Other shared packages (api-client, core-logic placeholders)
βββ database/
β βββ migrations/
β βββ seeds/
β βββ schema.sql
βββ .gitignore
βββ README.md # This file
βββ package.json # Root package.json for monorepo (npm workspaces)
Monorepo Management:
- Tooling: NPM Workspaces (TurboRepo or Nx can be added for advanced task running).
Web Frontend & Admin Panel (apps/web
):
- Framework: Next.js (v15+ with App Router located in
apps/web/src/app/
) - Language: TypeScript
- UI Library: React
- UI Components: ShadCN UI (local to
apps/web/src/components/ui/
) - Styling: Tailwind CSS (configured in
apps/web/tailwind.config.ts
, main styles inapps/web/src/app/globals.css
) - AI Integration: Genkit (by Google) (in
apps/web/src/ai/
) - Icons: Lucide React
- Shared Code: Consumes
packages/ui
(forAppLayout
,ArtNFTLogo
),packages/utils
(forcn
).
Mobile Application (apps/mobile
) (Placeholder):
- Framework: React Native
- (Details similar to previous, consumes shared packages as needed)
Backend API (apps/api
):
- Runtime: Node.js (Source in
apps/api/src/
) - Framework: Express.js
- Language: TypeScript
- AP B1C0 I Styles: RESTful APIs (GraphQL planned)
- Database: MySQL / MariaDB
- ORM: Sequelize
- Authentication: JWT (JSON Web Tokens)
- (Details similar to previous)
Shared Packages (packages/*
):
- Language: TypeScript
packages/ui
: Core shared layout and UI primitive components.packages/utils
: Core shared utilities likecn
.
- Node.js (v18 or later)
- npm (v7+ for workspace support, or Yarn)
- MySQL Server or MariaDB Server
- A MySQL/MariaDB client
- For Mobile: React Native development environment.
- Clone the repository:
git clone https://github.com/jagdish-pulpet/artnft.git cd artnft
- Install dependencies from the root:
npm install # This will install dependencies for all workspaces
- Environment Variables:
- Web App (
apps/web/.env.local
):NEXT_PUBLIC_BACKEND_URL=http://localhost:5000
(or your API's URL)GOOGLE_API_KEY=
(for Genkit)COINMARKETCAP_API_KEY=
(for Stats page)
- API Service (
apps/api/.env
):DB_HOST=localhost
DB_USER=your_db_user
DB_PASSWORD=your_db_password
DB_NAME=artnft_db
DB_PORT=3306
JWT_SECRET=your_jwt_secret
PORT=5000
(optional, defaults to 5000 inapps/api/src/server.ts
)
- Web App (
- API (
apps/api
):- Ensure MySQL/MariaDB server is running.
- Create the database (e.g.,
artnft_db
). - Apply schema:
npm run db:schema:apply --workspace=apps/api
(from the root directory) or navigate toapps/api
and runnpm run db:schema:apply
.
- Web Frontend (
apps/web
):- No additional specific setup beyond environment variables.
-
From the root directory (recommended):
# Run both web and API concurrently npm run dev
This typically uses the
dev
script in the rootpackage.json
:"dev": "npm run dev:web & npm run dev:api"
-
Individually:
- API (
apps/api
): In a terminal, from the root:npm run dev:api
(orcd apps/api && npm run dev
). Runs onhttp://localhost:5000
(orprocess.env.PORT
). - Web App (
apps/web
): In another terminal, from the root:npm run dev:web
(orcd apps/web && npm run dev
). Runs onhttp://localhost:9002
. - Genkit Dev UI (for
apps/web
): From the root:npm run genkit:watch --workspace=apps/web
(orcd apps/web && npm run genkit:watch
). Runs onhttp://localhost:4000
.
- API (
- Main styles in
apps/web/src/app/globals.css
. - Tailwind CSS configured in
apps/web/tailwind.config.ts
. - ShadCN UI components are local to
apps/web/src/components/ui/
.
- Genkit flows are located in
apps/web/src/ai/flows/
. - Genkit development server can be run via
npm run genkit:watch --workspace=apps/web
.
- This is currently a placeholder. Development would involve setting up React Native and integrating with
packages/api-client
andpackages/mobile-ui
.
- The
apps/api
service provides RESTful endpoints. GraphQL integration is planned. - Uses Express.js, Sequelize for MySQL/MariaDB.
npm run build --workspace=apps/web
npm run build --workspace=apps/api
- (For monorepo tools like Turborepo, a single
turbo run build
might be configured in the future).
- Frontend (
apps/web
): Firebase App Hosting, Vercel, Netlify. - Backend (
apps/api
): Node.js hosting (Google Cloud Run, AWS Elastic Beanstalk, Heroku). - Database: Cloud-hosted MySQL/MariaDB.
(Contribution guidelines would apply to the monorepo as a whole.)
- Phase 1 (Monorepo & Core):
- Establish Monorepo structure with NPM workspaces.
- Migrate Next.js app to
apps/web
. - Migrate Node.js backend to
apps/api
. - Refactor key shared elements (UI:
AppLayout
,ArtNFTLogo
; Utils:cn
) intopackages/*
. - Implement full backend CRUD operations and business logic in
apps/api
. - Fully connect
apps/web
toapps/api
for all features.
- Phase 2: GraphQL API & Mobile Foundation:
- Define GraphQL schema in
apps/api
. - Implement resolvers for GraphQL queries and mutations.
- Update/create
packages/api-client
to support GraphQL & REST. - Initialize React Native project in
apps/mobile
with basic navigation.
- Define GraphQL schema in
- Phase 3: Feature Expansion & Polish:
- Develop core mobile screens for
apps/mobile
. - Advanced GenAI integrations, personalized recommendations.
- Community features (commenting, messaging).
- Comprehensive testing, performance optimization, security hardening.
- Develop core mobile screens for
Distributed under the MIT License.
Project Lead / Maintainer: [CloudFi] - [artnft.io] Project Link: https://github.com/jagdish-pulpet/artnft
Thank you for checking out ArtNFT Marketplace! We're excited to see how it evolves.