A list of Cardano API Projects
- Next.js with TypeScript
- Tailwind CSS for styling
- Jest for testing
- Rust
- Axum for REST API
- Postgres for database
- SQLx for database operations
- Docker for containerization
- Node.js (v18 or higher)
- Rust (latest stable version)
- Docker and Docker Compose
- PostgreSQL (if running without Docker)
git clone https://github.com/cardanoapi/cardanoapi.io.git
cd cardanoapi.io
- Navigate to the backend directory:
cd backend/api
- Setup .env file as:
//backend/api/.env
POSTGRES_HOST=127.0.0.1
POSTGRES_PORT=6500
POSTGRES_USER= <YOUR_POSTGRES_USERNAME>
POSTGRES_PASSWORD=<YOUR_POSTGRES_PASSWORD>
POSTGRES_DB=rust_sqlx
DATABASE_URL=postgresql://<YOUR_POSTGRES_USERNAME>:<YOUR_POSTGRES_PASSWORD>@localhost:6500/rust_sqlx?schema=public
[email protected]
PGADMIN_DEFAULT_PASSWORD=<YOUR_PGADMIN_PASSWORD>
- Install dependencies:
cargo build
- Start the Postgres Database and PG Admin
docker compose -f docker-compose.yml up
- Run the Rust server:
cargo run
Test if the server is working at http://localhost:8000/test
- Install dependencies:
npm install
- Setup .env file as:
//.env
POSTGRES_HOST=127.0.0.1
POSTGRES_PORT=6500
POSTGRES_USER= <YOUR_POSTGRES_USERNAME>
POSTGRES_PASSWORD=<YOUR_POSTGRES_PASSWORD>
POSTGRES_DB=rust_sqlx
DATABASE_URL=postgresql://<YOUR_POSTGRES_USERNAME>:<YOUR_POSTGRES_PASSWORD>@localhost:6500/rust_sqlx
[email protected]
PGADMIN_DEFAULT_PASSWORD=<YOUR_PGADMIN_PASSWORD>
# Frontend Configuration
API_URL=http://localhost:8000
NODE_ENV=development
- Run the development server:
npm run dev
The frontend will be available at http://localhost:3000
docker compose -f docker-compose-dev.yml up
docker compose -f docker-compose-prod.yml up
The project uses SQL migrations located in backend/api/migrations/
. To run migrations:
- Ensure you're in the backend/api directory
- Run:
sqlx migrate run
npm test
├── src/
│ └── app/
│ ├── globals.css
│ ├── layout.tsx
|__ projects
|_[id]
|__page.tsx //Project Detail Page
│ ├── page.tsx //Home Page (/)
│ ├── Component/
│ │ ├── Card.tsx
│ │ ├── Pagination.tsx
│ │ └── SimilarProjects.tsx
└── public/ # Static assets
└── backend (Rust)
└── api/
├── migrations/ # Database migrations
└── src/ # Rust source code
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request