Home / First investigation

Find out where the exported notes go.

Use REP on a small app, follow its Export button to the file it writes, and check one detail yourself.

Our example app · Node.js and npm · your coding agent

1. Connect your agent

Any agent from the setup guide works. Not connected yet? Paste this into it:

Your coding agent

›Install REP for this coding agent: run npm install -g https://reverseengineerprojects.com/dl/rep-agents.tgz, then rep setup. Show me the setup plan before approving it, then check that the tools answer.

2. Ask where the CSV goes

The example is a six-file Electron app with an Export notes button. Your agent reads its code; nothing needs installing or launching.

Your coding agent

›Download https://reverseengineerprojects.com/examples/notes-example.zip into a new folder and unzip it. Use REP to find out what happens when I click Export notes: which file is written, where, with which columns. Give me the files and lines.

Download the example (zip, 6 files)

If your agent cannot download, unzip it yourself and give it the path to the notes-example folder with the same question.

3. Follow the answer back to the code

A good answer is short and points at lines:

The button calls notesApi.saveCsv(), which sends notes:save-csv to the main process. The main process turns the notes into CSV with toCsv and writes notes-export.csv in your Documents folder, with the columns id, title and created.

Page · renderer.jsExport notes calls notesApi.saveCsv()
Bridge · preload.jssends notes:save-csv
Main · main.jswrites notes-export.csv
Writer · csv.jsheader + one row per note

REP pairs the message name in the preload script with the handler that answers it in the main process, so the path from button to disk comes from the code, not a guess.

4. Check one detail yourself

Open main.js and find the handler. Change the column list to ['title', 'id'] and ask your agent again which columns the file has, and in which order. If it reads the code, it will notice.

main.js · the handler
ipcMain.handle('notes:save-csv', () => {
  const file = path.join(app.getPath('documents'), 'notes-export.csv');
  fs.writeFileSync(file, toCsv(notes, ['id', 'title', 'created']));
  return file;
});

Next: the same idea on a bigger app in the JavaScript & Electron guide, or a compiled program in the native guide.