Skip to content

Commit 12b6eb5

Browse files
committed
fix: updated read me
1 parent 1fb3e75 commit 12b6eb5

File tree

3 files changed

+44
-99
lines changed

3 files changed

+44
-99
lines changed

CONTRIBUTING.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -145,9 +145,8 @@ count = count + 1;
145145
count = count + 1;
146146

147147
// ✅ Good: Complex logic gets a comment block
148-
// Detect migration presets by checking if language ID includes a dash
149-
// e.g., "react-ts" or "react-vue" are migrations
150-
const isMigration = sourceLang.includes('-');
148+
// Convert language IDs for the AI engine
149+
const languageId = mapLanguageForAI(sourceLang);
151150
```
152151

153152
### React Components
@@ -356,12 +355,12 @@ npm run test:cov # With coverage
356355

357356
## Questions?
358357

359-
- **GitHub Issues:** For bugs and features
360-
- **GitHub Discussions:** For questions
361-
- **Email:** [contact@example.com] for sensitive topics
358+
- **GitHub Issues:** For bugs and feature requests
359+
- **GitHub Discussions:** For questions and ideas
360+
- **Email:** [contact@example.com] for other topics
362361

363362
---
364363

365364
**Thank you for contributing to CodePapi AI!** 🎉
366365

367-
Your efforts help make this tool better for everyone. We appreciate your time and effort!
366+
Your help improving this hobby project is much appreciated. Whether it's bug fixes, documentation, or new ideas, every contribution matters!

backend/README.md

Lines changed: 31 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -1,98 +1,52 @@
1-
<p align="center">
2-
<a href="http://nestjs.com/" target="blank"><img src="https://nestjs.com/img/logo-small.svg" width="120" alt="Nest Logo" /></a>
3-
</p>
4-
5-
[circleci-image]: https://img.shields.io/circleci/build/github/nestjs/nest/master?token=abc123def456
6-
[circleci-url]: https://circleci.com/gh/nestjs/nest
7-
8-
<p align="center">A progressive <a href="http://nodejs.org" target="_blank">Node.js</a> framework for building efficient and scalable server-side applications.</p>
9-
<p align="center">
10-
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/v/@nestjs/core.svg" alt="NPM Version" /></a>
11-
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/l/@nestjs/core.svg" alt="Package License" /></a>
12-
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/dm/@nestjs/common.svg" alt="NPM Downloads" /></a>
13-
<a href="https://circleci.com/gh/nestjs/nest" target="_blank"><img src="https://img.shields.io/circleci/build/github/nestjs/nest/master" alt="CircleCI" /></a>
14-
<a href="https://discord.gg/G7Qnnhy" target="_blank"><img src="https://img.shields.io/badge/discord-online-brightgreen.svg" alt="Discord"/></a>
15-
<a href="https://opencollective.com/nest#backer" target="_blank"><img src="https://opencollective.com/nest/backers/badge.svg" alt="Backers on Open Collective" /></a>
16-
<a href="https://opencollective.com/nest#sponsor" target="_blank"><img src="https://opencollective.com/nest/sponsors/badge.svg" alt="Sponsors on Open Collective" /></a>
17-
<a href="https://paypal.me/kamilmysliwiec" target="_blank"><img src="https://img.shields.io/badge/Donate-PayPal-ff3f59.svg" alt="Donate us"/></a>
18-
<a href="https://opencollective.com/nest#sponsor" target="_blank"><img src="https://img.shields.io/badge/Support%20us-Open%20Collective-41B883.svg" alt="Support us"></a>
19-
<a href="https://twitter.com/nestframework" target="_blank"><img src="https://img.shields.io/twitter/follow/nestframework.svg?style=social&label=Follow" alt="Follow us on Twitter"></a>
20-
</p>
21-
<!--[![Backers on Open Collective](https://opencollective.com/nest/backers/badge.svg)](https://opencollective.com/nest#backer)
22-
[![Sponsors on Open Collective](https://opencollective.com/nest/sponsors/badge.svg)](https://opencollective.com/nest#sponsor)-->
23-
24-
## Description
25-
26-
[Nest](https://github.com/nestjs/nest) framework TypeScript starter repository.
27-
28-
## Project setup
1+
# CodePapi Backend
292

30-
```bash
31-
$ pnpm install
32-
```
33-
34-
## Compile and run the project
3+
## Overview
354

36-
```bash
37-
# development
38-
$ pnpm run start
39-
40-
# watch mode
41-
$ pnpm run start:dev
5+
NestJS API server that orchestrates local LLM inference via Ollama and LangChain. Provides endpoints for code translation, review, and bug detection.
426

43-
# production mode
44-
$ pnpm run start:prod
45-
```
7+
**Note:** This is part of an experimental hobby project. Code quality and performance optimizations are secondary to learning and experimentation.
468

47-
## Run tests
9+
## Project Setup
4810

4911
```bash
50-
# unit tests
51-
$ pnpm run test
52-
53-
# e2e tests
54-
$ pnpm run test:e2e
55-
56-
# test coverage
57-
$ pnpm run test:cov
12+
npm install
5813
```
5914

60-
## Deployment
61-
62-
When you're ready to deploy your NestJS application to production, there are some key steps you can take to ensure it runs as efficiently as possible. Check out the [deployment documentation](https://docs.nestjs.com/deployment) for more information.
63-
64-
If you are looking for a cloud-based platform to deploy your NestJS application, check out [Mau](https://mau.nestjs.com), our official platform for deploying NestJS applications on AWS. Mau makes deployment straightforward and fast, requiring just a few simple steps:
15+
## Running the Application
6516

6617
```bash
67-
$ pnpm install -g @nestjs/mau
68-
$ mau deploy
18+
# Development mode
19+
npm run start:dev
20+
21+
# Production mode
22+
npm run start
6923
```
7024

71-
With Mau, you can deploy your application in just a few clicks, allowing you to focus on building features rather than managing infrastructure.
25+
The API runs on `http://localhost:3000`
7226

73-
## Resources
27+
## Endpoints
7428

75-
Check out a few resources that may come in handy when working with NestJS:
29+
- `POST /converter/translate` — Translate code between languages
30+
- `POST /converter/review` — Get AI feedback on code
31+
- `POST /converter/fix` — Get AI bug fixes with diff
7632

77-
- Visit the [NestJS Documentation](https://docs.nestjs.com) to learn more about the framework.
78-
- For questions and support, please visit our [Discord channel](https://discord.gg/G7Qnnhy).
79-
- To dive deeper and get more hands-on experience, check out our official video [courses](https://courses.nestjs.com/).
80-
- Deploy your application to AWS with the help of [NestJS Mau](https://mau.nestjs.com) in just a few clicks.
81-
- Visualize your application graph and interact with the NestJS application in real-time using [NestJS Devtools](https://devtools.nestjs.com).
82-
- Need help with your project (part-time to full-time)? Check out our official [enterprise support](https://enterprise.nestjs.com).
83-
- To stay in the loop and get updates, follow us on [X](https://x.com/nestframework) and [LinkedIn](https://linkedin.com/company/nestjs).
84-
- Looking for a job, or have a job to offer? Check out our official [Jobs board](https://jobs.nestjs.com).
33+
All requests expect JSON bodies with `code` and language parameters.
8534

86-
## Support
35+
## Architecture
8736

88-
Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please [read more here](https://docs.nestjs.com/support).
37+
- **Controller:** `converter.controller.ts` — HTTP request handling
38+
- **Service:** `converter.service.ts` — AI prompt orchestration via LangChain
39+
- **Module:** `converter.module.ts` — Dependency injection setup
8940

90-
## Stay in touch
41+
## Key Dependencies
9142

92-
- Author - [Kamil Myśliwiec](https://twitter.com/kammysliwiec)
93-
- Website - [https://nestjs.com](https://nestjs.com/)
94-
- Twitter - [@nestframework](https://twitter.com/nestframework)
43+
- `@langchain/ollama` — LLM integration with Ollama
44+
- `@nestjs/core` — Framework
45+
- `@nestjs/common` — Common utilities
9546

96-
## License
47+
## Performance Notes
9748

98-
Nest is [MIT licensed](https://github.com/nestjs/nest/blob/master/LICENSE).
49+
- AI responses take 10-90+ seconds depending on code size and hardware
50+
- Requests are blocking (no queue system)
51+
- Suitable for local development, not production use
52+
- Single model instance (Qwen2.5-Coder)

frontend/README.md

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
## Adding More Languages
22

3-
If you'd like to add new programming languages or framework migration presets to the UI, edit `frontend/src/constants/languages.ts`. The file exports two arrays: `LANGUAGES` (regular languages/options) and `MIGRATIONS` (framework-specific migration presets). Follow these guidelines:
3+
To add new programming languages to the UI, edit `frontend/src/constants/languages.ts`. The file exports a `LANGUAGES` array with supported languages.
44

55
- File location: `frontend/src/constants/languages.ts`
6-
- Each language entry should include at least `id` and `name`.
7-
- Migration presets may include `id`, `name`, and any additional metadata your application uses.
6+
- Each language entry should include `id` and `name`
87

9-
Example entries:
8+
Example:
109

1110
```ts
1211
// frontend/src/constants/languages.ts
@@ -16,20 +15,13 @@ export const LANGUAGES = [
1615
{ id: 'python', name: 'Python' },
1716
// Add more languages here
1817
];
19-
20-
export const MIGRATIONS = [
21-
{ id: 'react-ts', name: 'React (Class) → React (TS)' },
22-
{ id: 'react-vue', name: 'React → Vue' },
23-
// Add more migration presets here
24-
];
2518
```
2619

2720
Tips:
2821

29-
- Keep `id` values unique and use kebab-case (e.g. `react-ts`, `node-express`).
30-
- If you add new migration presets, ensure the backend conversion logic (if any) recognizes the `id` and maps it to the proper prompt behavior.
31-
- After editing `languages.ts`, the `LanguageSelector` and other UI components will automatically include your new items.
32-
- You can add additional metadata (for example `editorMode`, `fileExtension`, or `isMigration`) if you want the UI or backend to handle the language differently — just update the consuming code accordingly.
22+
- Keep `id` values unique and use lowercase (e.g., `javascript`, `python`)
23+
- After editing `languages.ts`, the `LanguageSelector` component automatically includes your new items
24+
- The backend `converter.service.ts` handles the translation prompt for each language
3325

34-
If you want help wiring up a more complex metadata format, tell me which fields you'd like and I can update the types and components for you.
26+
For more complex metadata or customization, check the component prop types in `LanguageSelector.tsx`.
3527

0 commit comments

Comments
 (0)