Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
WilcoApp committed Jan 8, 2025
1 parent 92a155e commit e4ffba9
Show file tree
Hide file tree
Showing 185 changed files with 12,932 additions and 26,991 deletions.
58 changes: 53 additions & 5 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,57 @@
{
"name": "Anythink Development Container",
"image": "public.ecr.aws/v0a2l7y2/wilco/anythink-devcontainer:latest",
"customizations": {
"name": "Wilco Development Container",
"forwardPorts": [3000, 3001, 5432, 2181, 9092],
"portsAttributes": {
"3000": {
"label": "Backend",
"elevateIfNeeded": true,
"requireLocalPort": true,
"onAutoForward": "silent"
},
"3001": {
"label": "Frontend",
"elevateIfNeeded": true,
"requireLocalPort": true,
"onAutoForward": "silent"
},
"5432": {
"label": "Database",
"elevateIfNeeded": true,
"requireLocalPort": true,
"onAutoForward": "silent"
},
"2181": {
"label": "Zookeeper",
"elevateIfNeeded": true,
"requireLocalPort": true,
"onAutoForward": "silent"
},
"9092": {
"label": "Kafka",
"elevateIfNeeded": true,
"requireLocalPort": true,
"onAutoForward": "silent"
}
},
"postCreateCommand": "/bin/bash .devcontainer/setup.sh",

"features": {
"ghcr.io/devcontainers/features/sshd:1": {
"version": "latest"
}
},

"customizations": {
"vscode": {
"extensions": ["GitHub.copilot", "GitHub.copilot-chat"]
"settings": {
"extensions.ignoreRecommendations": true,
"workbench.startupEditor": "none",
"workbench.colorTheme": "Visual Studio Dark",
"workbench.colorCustomizations": {},
"workbench.welcomePage.walkthroughs.openOnInstall": false,
"workbench.welcomePage.experimental.videoTutorials": "off",
"github.codespaces.defaultExtensions": []
}
}
}
}
}
1 change: 1 addition & 0 deletions .devcontainer/open_port.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
sleep 10 && gh codespace ports visibility 3000:public 3001:public -c $CODESPACE_NAME
11 changes: 7 additions & 4 deletions .devcontainer/setup.sh
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,11 @@ echo "export CODESPACE_BACKEND_HOST=\"${CODESPACE_BACKEND_HOST}\"" >> ~/.bashrc
echo "export CODESPACE_BACKEND_URL=\"${CODESPACE_BACKEND_URL}\"" >> ~/.bashrc
echo "export CODESPACE_WDS_SOCKET_PORT=443" >> ~/.bashrc

# Export welcome prompt in bash:
echo "printf \"\n\n☁️☁️☁️️ Anythink: Develop in the Cloud ☁️☁️☁️\n\"" >> ~/.bashrc
echo "printf \"\n\x1b[31m \x1b[1m👉 Type: \\\`docker compose up\\\` to run the project. 👈\n\n\"" >> ~/.bashrc
nohup bash -c "cd /wilco-agent && node agent.js &" >> /tmp/agent.log 2>&1
echo "(&>/dev/null .devcontainer/open_port.sh &)" >> ~/.bashrc

nohup bash -c "cd /wilco-agent && node agent.js &" >> /tmp/agent.log 2>&1
# Check if docker is installed
if command -v docker &> /dev/null
then
docker compose pull
fi
3 changes: 0 additions & 3 deletions .github/pull_request_template.md

This file was deleted.

157 changes: 0 additions & 157 deletions .github/workflows/k8s.yml

This file was deleted.

10 changes: 0 additions & 10 deletions .github/workflows/wilco-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,6 @@ jobs:
- name: Check out project
uses: actions/checkout@v2

- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: "16"

- name: Start MongoDB
uses: supercharge/[email protected]
with:
mongodb-version: "4.4"

- uses: oNaiPs/secrets-to-env-action@v1
with:
secrets: ${{ toJSON(secrets) }}
Expand Down
51 changes: 20 additions & 31 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,37 +1,26 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
# Compiled output
backend/dist/
*.js
*.js.map

# dependencies
/node_modules
/backend/node_modules
/frontend/node_modules
/.wilco-helpers/node_modules
/tests/e2e/node_modules
/tests/frontend/node_modules/
/tests/frontend/test-results/
/tests/frontend/playwright-report/
/tests/frontend/playwright/.cache/
# Dependency directories
backend/node_modules/
frontend/node_modules/

/.pnp
.pnp.js
# Environment files
backend/.env
backend/.env.local
frontend/.env
frontend/.env.local

# testing
/coverage
# Logs
logs/
*.log

# production
/backend/build
/frontend/build
# IDE-specific files
.vscode/
.idea/

# misc
# OS generated files
.DS_Store
.env
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*

#IDEs
/.idea/
Thumbs.db
3 changes: 0 additions & 3 deletions .vscode/settings.json

This file was deleted.

63 changes: 63 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# RiskiStore

A modern e-commerce web application built with a robust tech stack. The frontend is developed using React with TypeScript for type safety and better developer experience, powered by Vite for lightning-fast builds. The backend is built with NestJS, a progressive Node.js framework, with PostgreSQL as the database and Apache Kafka for event streaming. The entire application is containerized using Docker for consistent development and deployment environments.

## Project Structure

```
riskistore/
├── frontend/ # React + TypeScript frontend application (Vite)
├── backend/ # NestJS backend service
└── docker-compose.yml
```

## Prerequisites

- GitHub Codespaces
- Docker and Docker Compose (pre-installed in Codespace)

## Getting Started

The application is configured to run in GitHub Codespaces environment. Once your Codespace is ready:

1. Start the application using Docker Compose:
```bash
docker-compose up
```

This will start:
- Frontend development server with hot-reload
- Backend API service
- PostgreSQL database
- Kafka and Zookeeper services

The frontend will be available at the automatically forwarded port, typically `3000`.
The backend API will be accessible at `3001`.

## Development

### Frontend
The frontend application is located in the `frontend/` directory. It's built with:
- React
- TypeScript
- Vite for fast development and optimized builds
- Hot-reload enabled for quick development iterations

### Backend
The backend application is located in the `backend/` directory. It features:
- NestJS framework
- TypeScript
- PostgreSQL database
- Kafka integration for event streaming
- RESTful API endpoints with built-in OpenAPI (Swagger) documentation

## Docker Configuration

The project includes:
- `docker-compose.yml` - Main Docker Compose configuration
- `frontend/Dockerfile.dev` - Frontend development container configuration
- `backend/Dockerfile.dev` - Backend development container configuration

## License

This project is licensed under the MIT License - see the LICENSE file for details.
Loading

0 comments on commit e4ffba9

Please sign in to comment.